X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fjs%2FParser.java;h=932c5b8fd2284cc80fcda44a22ce8a7b91f183e6;hb=c04af3bec88e6cbaf461700900d00d1e4d096d26;hp=6b37917d6a5dbb515a75128409a69e93a85810df;hpb=2994937ce9c79076df13f1ed2d0601f81b72c06e;p=org.ibex.core.git diff --git a/src/org/ibex/js/Parser.java b/src/org/ibex/js/Parser.java index 6b37917..932c5b8 100644 --- a/src/org/ibex/js/Parser.java +++ b/src/org/ibex/js/Parser.java @@ -72,7 +72,7 @@ class Parser extends Lexer implements ByteCodes { public Parser(Reader r, String sourceName, int line) throws IOException { super(r, sourceName, line); } /** for debugging */ - public static void main(String[] s) throws Exception { + public static void main(String[] s) throws IOException { JS block = JS.fromReader("stdin", 0, new InputStreamReader(System.in)); if (block == null) return; System.out.println(block); @@ -192,7 +192,6 @@ class Parser extends Lexer implements ByteCodes { int i = 0; if (peekToken() != RB) while(true) { // iterate over the initialization values - int size = b.size; b.add(parserLine, LITERAL, JS.N(i++)); // push the index in the array to place it into if (peekToken() == COMMA || peekToken() == RB) b.add(parserLine, LITERAL, null); // for stuff like [1,,2,] @@ -390,8 +389,6 @@ class Parser extends Lexer implements ByteCodes { startExpr(b, precedence[tok]); - int size = b.size; - if (tok != ADD_TRAP && tok != DEL_TRAP) { // tok-1 is always s/^ASSIGN_// (0 is BITOR, 1 is ASSIGN_BITOR, etc) b.add(parserLine, tok - 1, tok-1==ADD ? JS.N(2) : null); @@ -743,7 +740,6 @@ class Parser extends Lexer implements ByteCodes { if (peekToken() != RP) { // extended Ibex catch block: catch(e faultCode "foo.bar.baz") consume(NAME); - String propName = string; b.add(parserLine, DUP); b.add(parserLine, LITERAL, string); b.add(parserLine, GET);