File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -645,7 +645,7 @@ export type multiplicative_expr = binary_expr;
645645
646646export type multiplicative_operator = "*" | "/" | "%" ;
647647
648- export type primary = cast_expr | literal | aggr_func | func_call | case_expr | interval_expr | column_ref | param | expr | expr_list | var_decl ;
648+ export type primary = cast_expr | literal | aggr_func | func_call | case_expr | interval_expr | column_ref | param | expr | expr_list | var_decl | { type : 'origin' ; value : string ; } ;
649649
650650
651651
Original file line number Diff line number Diff line change @@ -2139,6 +2139,7 @@ primary
21392139 }
21402140 / var_decl
21412141 / __ prepared_symbol :'$' n :literal_numeric {
2142+ // => { type: 'origin'; value: string; }
21422143 return {
21432144 type: ' origin' ,
21442145 value: ` $${ n .value } ` ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ const ast = peg.parser.parse(syntax);
77
88
99const built = [ ] ;
10- function checkCode ( r ) {
10+ function checkCode ( r , onName ) {
1111 const simple = / ^ [ \s $ ] * \/ \/ \s * = > \s * ( [ ^ $ \r \n ] + ) $ / m. exec ( r . code ) ;
1212 if ( simple ) return simple [ 1 ] . trim ( ) ;
1313 const complex = / ^ [ \s $ ] * \/ \* ( [ ^ § ] + ) \* \/ / m. exec ( r . code ) ;
@@ -20,7 +20,7 @@ function checkCode(r) {
2020 return typecode . substr ( at + 2 ) . trim ( ) ;
2121}
2222function buildExpression ( r , onName ) {
23- if ( r . code ) return checkCode ( r )
23+ if ( r . code ) return checkCode ( r , onName )
2424 switch ( r . type ) {
2525 case 'choice' :
2626 const ret = r . alternatives
You can’t perform that action at this time.
0 commit comments