Diff
Not logged in

Differences From Artifact [4856c979362ef435]:

To Artifact [1d6de9cb69bbf7d4]:


188 return e; 188 return e; 189 } 189 } 190 190 191 if( tryEat("fun") ) 191 if( tryEat("fun") ) 192 { 192 { 193 eat("(", "after fun"); 193 eat("(", "after fun"); 194 string[] params; 194 string[] params; 195 for(;;) | 195 while(!tryEat(")")) 196 { 196 { 197 if( lex.empty ) { 197 if( lex.empty ) { 198 auto e = ParserException.create(lex,"Une 198 auto e = ParserException.create(lex,"Une 199 throw e; 199 throw e; 200 } 200 } 201 if( lex.front.kind != Token.Kind.identifier ) { 201 if( lex.front.kind != Token.Kind.identifier ) { 202 auto e = ParserException.create(lex,"Ide 202 auto e = ParserException.create(lex,"Ide ................................................................................................................................................................................ 306 new IntLiteralExpression(null, BigInt(1)), 306 new IntLiteralExpression(null, BigInt(1)), 307 new FuncallExpression(null, 307 new FuncallExpression(null, 308 new FunLiteralExpression(null, ["abc"], [ 308 new FunLiteralExpression(null, ["abc"], [ 309 ]), 309 ]), 310 new IntLiteralExpression(null, BigInt(4)) 310 new IntLiteralExpression(null, BigInt(4)) 311 )))); 311 )))); 312 } 312 } > 313 unittest > 314 { > 315 auto p = parserFromString(`var x = 1; var f = fun(){x=x+1;}; f(); f(); x > 316 Program prog = p.parseProgram(); > 317 }