changeset 193:66ed8886abc0

parsing change to allow indexing of literals without parens git-svn-id: https://luan-java.googlecode.com/svn/trunk@194 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Wed, 02 Jul 2014 03:27:35 +0000
parents f2c6c22cddc0
children 08df375e2e5f
files core/src/luan/impl/LuanParser.java
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r f2c6c22cddc0 -r 66ed8886abc0 core/src/luan/impl/LuanParser.java
--- a/core/src/luan/impl/LuanParser.java	Tue Jul 01 07:06:29 2014 +0000
+++ b/core/src/luan/impl/LuanParser.java	Wed Jul 02 03:27:35 2014 +0000
@@ -763,15 +763,19 @@
 		exp = FunctionExpr(in);
 		if( exp != null )
 			return parser.success(exp);
+/*
 		exp = TableExpr(in);
 		if( exp != null )
 			return parser.success(exp);
+*/
 		exp = VarExp(in);
 		if( exp != null )
 			return parser.success(exp);
+/*
 		exp = Literal(in);
 		if( exp != null )
 			return parser.success(exp);
+*/
 		return parser.failure(null);
 	}
 
@@ -931,6 +935,13 @@
 		String name = Name(in);
 		if( name != null )
 			return parser.success(nameVar(start,name));
+		Expressions exp;
+		exp = TableExpr(in);
+		if( exp != null )
+			return parser.success(exprVar(exp));
+		exp = Literal(in);
+		if( exp != null )
+			return parser.success(exprVar(exp));
 		return parser.failure(null);
 	}