From 0b7d87e4a32bd443605a1b467293017b7bfcc0ca Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 7 Feb 2012 15:26:20 -0700 Subject: Fixed another reference bug in return statements. Thanks David :) --- src/parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/parser.y b/src/parser.y index c5b86ea..383ab28 100644 --- a/src/parser.y +++ b/src/parser.y @@ -163,8 +163,8 @@ cmpltExprList: ; cmpltExpr: expr ';' { bld.endCmpltExpr(); } - | tokReturn '(' expr ')' ';' { bld.addNode( AstNode::tReturn ); bld.endCmpltExpr();} - | tokReturn '(' ')' ';' { bld.addNode( AstNode::tReturn ); bld.endCmpltExpr();} + | tokReturn '(' expr ')' ';' { bld.addNode( AstNode::tDeref ); bld.addNode( AstNode::tReturn ); bld.endCmpltExpr(); } + | tokReturn '(' ')' ';' { bld.addLiteral( Variable::tNull ); bld.addNode( AstNode::tReturn ); bld.endCmpltExpr();} | tokGoto '(' expr ')' ';' { bld.addNode( AstNode::tGoto ); bld.endCmpltExpr();} | ifbase | tokFor tokEach { -- cgit v1.2.3