X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Fjs%2FParser.java;h=bffeeb46157931c7a8f1c73f9624272892d1fa48;hb=163ff4c57ec557bb8615f80e875f045cdfbad696;hp=0601bbd1cdb3dffc9de20b7550251a56180aa215;hpb=75b9e1e72f6067e59a1e5312c91d20d05ec8a927;p=org.ibex.core.git diff --git a/src/org/xwt/js/Parser.java b/src/org/xwt/js/Parser.java index 0601bbd..bffeeb4 100644 --- a/src/org/xwt/js/Parser.java +++ b/src/org/xwt/js/Parser.java @@ -73,7 +73,7 @@ class Parser extends Lexer implements ByteCodes { /** for debugging */ public static void main(String[] s) throws Exception { - JSFunction block = JSFunction.fromReader("stdin", 0, new InputStreamReader(System.in)); + JS block = JS.fromReader("stdin", 0, new InputStreamReader(System.in)); if (block == null) return; System.out.println(block); } @@ -370,9 +370,9 @@ class Parser extends Lexer implements ByteCodes { Grammar g = parseGrammar(null); if (peekToken() == LC) { g.action = new JSFunction(sourceName, parserLine, null); - parseBlock(g.action); - g.action.add(parserLine, LITERAL, null); // in case we "fall out the bottom", return NULL - g.action.add(parserLine, RETURN); + parseBlock((JSFunction)g.action); + ((JSFunction)g.action).add(parserLine, LITERAL, null); // in case we "fall out the bottom", return NULL + ((JSFunction)g.action).add(parserLine, RETURN); } b.add(parserLine, MAKE_GRAMMAR, g); b.add(parserLine, PUT);