From 9de9d4e733ce872806c569334af4c9ace01db203 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 6 Feb 2012 12:22:27 -0700 Subject: Important bugfix in stack code. Thanks david! --- src/parser.y | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/parser.y') diff --git a/src/parser.y b/src/parser.y index b50b897..bbe4840 100644 --- a/src/parser.y +++ b/src/parser.y @@ -160,10 +160,10 @@ cmpltExprList: | cmpltExprList cmpltExpr ; -cmpltExpr: expr ';' - | tokReturn '(' expr ')' ';' { bld.addNode( AstNode::tReturn ); } - | tokReturn '(' ')' ';' { bld.addNode( AstNode::tReturn ); } - | tokGoto '(' expr ')' ';' { bld.addNode( AstNode::tGoto ); } +cmpltExpr: expr ';' { bld.endCmpltExpr(); } + | tokReturn '(' expr ')' ';' { bld.addNode( AstNode::tReturn ); bld.endCmpltExpr();} + | tokReturn '(' ')' ';' { bld.addNode( AstNode::tReturn ); bld.endCmpltExpr();} + | tokGoto '(' expr ')' ';' { bld.addNode( AstNode::tGoto ); bld.endCmpltExpr();} | ifbase | tokFor tokEach { bld.addNode( AstNode::tForEach ); @@ -269,11 +269,11 @@ expr: literal ; funcCallParams: - | expr funcCallParamsEx + | expr funcCallParamsEx { bld.stackMod( AstNode::tPop ); } ; funcCallParamsEx: - | funcCallParamsEx ',' expr + | funcCallParamsEx ',' expr { bld.stackMod( AstNode::tPop ); } ; listValues: expr { bld.addNode( AstNode::tAppend ); } -- cgit v1.2.3