Mercurial Hosting > luan
diff core/src/luan/impl/LuanParser.java @ 320:fed1893821bf
remove global namespace
git-svn-id: https://luan-java.googlecode.com/svn/trunk@321 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Fri, 06 Feb 2015 21:54:41 +0000 |
parents | 8afe9f2fdfec |
children | 7f7708e8fdd4 |
line wrap: on
line diff
--- a/core/src/luan/impl/LuanParser.java Thu Feb 05 21:55:49 2015 +0000 +++ b/core/src/luan/impl/LuanParser.java Fri Feb 06 21:54:41 2015 +0000 @@ -250,6 +250,7 @@ || (stmt=FunctionStmt()) != null || (stmt=LocalFunctionStmt()) != null || (stmt=ImportStmt()) != null + || (stmt=JavaStmt()) != null || (stmt=BreakStmt()) != null || (stmt=ForStmt()) != null || (stmt=TryStmt()) != null @@ -387,6 +388,13 @@ return true; } + private Stmt JavaStmt() throws ParseException { + parser.begin(); + if( !Keyword("java",In.NOTHING) ) + return parser.failure(null); + return parser.success( new JavaStmt() ); + } + private Stmt BreakStmt() throws ParseException { parser.begin(); if( !Keyword("break",In.NOTHING) ) @@ -1148,6 +1156,7 @@ "if", "import", "in", + "java", "local", "nil", "not",