@@ -144,11 +144,10 @@ let ParserRules = [
144144 } ,
145145 { "name" : "lambda" , "symbols" : [ "explicitParameters" , "FAT_ARROW" , "explicitReturn" ] , "postprocess" : ( [ parameters , , body ] ) => ( { type : 'lambda' , variant : 'explicit' , parameters, body} ) } ,
146146 { "name" : "lambda" , "symbols" : [ "implicitParameters" , "FAT_ARROW" , "implicitReturn" ] , "postprocess" : ( [ parameters , , body ] ) => ( { type : 'lambda' , variant : 'implicit' , parameters, body} ) } ,
147- { "name" : "explicitReturn" , "symbols" : [ "L_CURLY" , "singleLine" , "multiLine" , "__" , "RETURN" , "returnValues" , "R_CURLY" ] , "postprocess" : ( [ , statement1 , statement2 , , , returnValues ] ) => ( { statement : [ statement1 , statement2 ] . join ( '\n' ) . trim ( ) , returnValues} ) } ,
148- { "name" : "explicitReturn" , "symbols" : [ "L_CURLY" , "multiLine" , "__" , "RETURN" , "returnValues" , "R_CURLY" ] , "postprocess" : ( [ , statement , , , returnValues ] ) => ( { statement, returnValues} ) } ,
149- { "name" : "explicitReturn" , "symbols" : [ "L_CURLY" , "singleLine" , "__" , "RETURN" , "returnValues" , "R_CURLY" ] , "postprocess" : ( [ , statement , , , returnValues ] ) => ( { statement, returnValues} ) } ,
150- { "name" : "explicitReturn" , "symbols" : [ "L_CURLY" , "_" , "RETURN" , "returnValues" , "R_CURLY" ] , "postprocess" : ( [ , , , returnValues ] ) => ( { statement : '' , returnValues} ) } ,
151- { "name" : "implicitReturn" , "symbols" : [ "returnValue" ] , "postprocess" : ( [ returnValue ] ) => ( { returnValues : [ returnValue ] } ) } ,
147+ { "name" : "explicitReturn" , "symbols" : [ "L_CURLY" , "singleLine" , "multiLine" , "R_CURLY" ] , "postprocess" : ( [ , statement1 , statement2 ] ) => ( { statement : [ statement1 , statement2 ] . join ( '\n' ) . trim ( ) , returnValues : [ ] } ) } ,
148+ { "name" : "explicitReturn" , "symbols" : [ "L_CURLY" , "multiLine" , "R_CURLY" ] , "postprocess" : ( [ , statement ] ) => ( { statement, returnValues : [ ] } ) } ,
149+ { "name" : "explicitReturn" , "symbols" : [ "L_CURLY" , "singleLine" , "R_CURLY" ] , "postprocess" : ( [ , statement ] ) => ( { statement, returnValues : [ ] } ) } ,
150+ { "name" : "implicitReturn" , "symbols" : [ "singleLine" ] , "postprocess" : ( [ statement ] , _ , reject ) => statement . trim ( ) . startsWith ( '{' ) ? reject : ( { returnValues : [ ] } ) } ,
152151 { "name" : "returnValues" , "symbols" : [ "returnValue" , "COMMA" , "returnValues" ] , "postprocess" : ( [ hit , , rest ] ) => [ hit , ...rest ] } ,
153152 { "name" : "returnValues" , "symbols" : [ "returnValue" ] } ,
154153 { "name" : "returnValue" , "symbols" : [ "value" , "AS" , "token" ] , "postprocess" : ( [ original , , name ] ) => ( { ...original , alias : name . value } ) } ,
@@ -197,6 +196,7 @@ let ParserRules = [
197196 { "name" : "chars" , "symbols" : [ / [ a - z A - Z ] / , "chars$ebnf$1" ] , "postprocess" : ( [ value , rest ] ) => `${ value } ${ rest . join ( '' ) } ` } ,
198197 { "name" : "multiLine" , "symbols" : [ "newLine" , "singleLine" , "multiLine" ] , "postprocess" : ( [ , hit , rest ] , _ , reject ) => rest ? [ hit , rest ] . join ( '\n' ) . trim ( ) : reject } ,
199198 { "name" : "multiLine" , "symbols" : [ "newLine" , "multiLine" ] , "postprocess" : ( [ hit , rest ] ) => [ hit , rest ] . join ( '\n' ) . trim ( ) } ,
199+ { "name" : "multiLine" , "symbols" : [ "newLine" , "singleLine" ] , "postprocess" : ( [ hit , rest ] ) => [ hit , rest ] . join ( '\n' ) . trim ( ) } ,
200200 { "name" : "multiLine" , "symbols" : [ "newLine" ] , "postprocess" : id } ,
201201 { "name" : "singleLine$ebnf$1" , "symbols" : [ / [ ^ \n ] / ] } ,
202202 { "name" : "singleLine$ebnf$1" , "symbols" : [ "singleLine$ebnf$1" , / [ ^ \n ] / ] , "postprocess" : function arrpush ( d ) { return d [ 0 ] . concat ( [ d [ 1 ] ] ) ; } } ,
0 commit comments