changeset 33:8793c71ad47a

change numeric for syntax git-svn-id: https://luan-java.googlecode.com/svn/trunk@34 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Sun, 16 Dec 2012 05:07:42 +0000
parents c3eab5a3ce3c
children 0cdc1da466ee
files src/luan/interp/LuaParser.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
diff -r c3eab5a3ce3c -r 8793c71ad47a src/luan/interp/LuaParser.java
--- a/src/luan/interp/LuaParser.java	Fri Dec 14 05:40:35 2012 +0000
+++ b/src/luan/interp/LuaParser.java	Sun Dec 16 05:07:42 2012 +0000
@@ -277,10 +277,10 @@
 
 	Rule NumericForStmt() {
 		return Sequence(
-			Keyword("for"), Name(), '=', Spaces(), Expr(), ',', Spaces(), Expr(),
+			Keyword("for"), Name(), '=', Spaces(), Expr(), Keyword("to"), Expr(),
 			push( new ConstExpr(new LuaNumber(1)) ),  // default step
 			Optional(
-				',', Spaces(),
+				Keyword("step"),
 				drop(),
 				Expr()
 			),
@@ -775,7 +775,9 @@
 		"or",
 		"repeat",
 		"return",
+		"step",
 		"then",
+		"to",
 		"true",
 		"until",
 		"while"