added stmt_expression rule to parser, added to general_items

git-svn-id: svn://anubis/fart/branches/scene-file-scripting@331 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop 2010-10-04 20:54:47 +00:00
parent 91ea5a20e0
commit 71e40b0277

View File

@ -245,6 +245,7 @@ general_item: transform_block { $$ = $1; }
| shape_definition { $$ = $1; } | shape_definition { $$ = $1; }
| shape { $$ = $1; } | shape { $$ = $1; }
| for { $$ = $1; } | for { $$ = $1; }
| stmt_expression { $$ = $1; }
; ;
intersect: INTERSECT LCURLY bool_items RCURLY { intersect: INTERSECT LCURLY bool_items RCURLY {
@ -589,7 +590,10 @@ expression: term { $$ = $1; }
| MINUS expression %prec UMINUS { | MINUS expression %prec UMINUS {
$$ = new BinOpNode('-', new NumberNode(0.0), $2); $$ = new BinOpNode('-', new NumberNode(0.0), $2);
} }
| assignment { $$ = $1; } | stmt_expression { $$ = $1; }
;
stmt_expression: assignment { $$ = $1; }
| local_assignment { $$ = $1; } | local_assignment { $$ = $1; }
| local_decl { $$ = $1; } | local_decl { $$ = $1; }
; ;