diff src/luan/interp/LuanParser.java @ 153:fa03671f59a0

replace ExpressionsStmt with FnCallStmt git-svn-id: https://luan-java.googlecode.com/svn/trunk@154 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Tue, 17 Jun 2014 02:57:14 +0000
parents c9100f29fae0
children c2e5101682ae
line wrap: on
line diff
--- a/src/luan/interp/LuanParser.java	Mon Jun 16 10:50:40 2014 +0000
+++ b/src/luan/interp/LuanParser.java	Tue Jun 17 02:57:14 2014 +0000
@@ -249,7 +249,7 @@
 			|| (stmt=RepeatStmt()) != null
 			|| (stmt=IfStmt()) != null
 			|| (stmt=SetStmt()) != null
-			|| (stmt=ExpressionsStmt()) != null
+			|| (stmt=FnCallStmt()) != null
 		) {
 			stmts.add(stmt);
 		}
@@ -523,12 +523,13 @@
 		return parser.success( new SetStmt( vars.toArray(new Settable[0]), values ) );
 	}
 
-	private Stmt ExpressionsStmt() throws ParseException {
+	private Stmt FnCallStmt() throws ParseException {
 		parser.begin();
-		Expressions exprs = ExpList(In.NOTHING);
-		if( exprs==null )
+		Code code = VarExp(In.NOTHING);
+		if( !(code instanceof FnCall) )
 			return parser.failure(null);
-		return parser.success( new ExpressionsStmt(exprs) );
+		FnCall fnCall = (FnCall)code;
+		return parser.success( new FnCallStmt(fnCall) );
 	}
 
 	private Settable SettableVar() throws ParseException {