private NewExpr parseNew(SymbolTable tbl) throws CompileError { ArrayInit init = null; int t = lex.lookAhead(); if (isBuiltinType(t)) { lex.get(); ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return new NewExpr(t, size, init); } else if (t == Identifier) { ASTList name = parseClassType(tbl); t = lex.lookAhead(); if (t == '(') { ASTList args = parseArgumentList(tbl); return new NewExpr(name, args); } else if (t == '[') { ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return NewExpr.makeObjectArray(name, size, init); } } throw new SyntaxError(lex); }
private NewExpr parseNew(SymbolTable tbl) throws CompileError { ArrayInit init = null; int t = lex.lookAhead(); if (isBuiltinType(t)) { lex.get(); ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return new NewExpr(t, size, init); } else if (t == Identifier) { ASTList name = parseClassType(tbl); t = lex.lookAhead(); if (t == '(') { ASTList args = parseArgumentList(tbl); return new NewExpr(name, args); } else if (t == '[') { ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return NewExpr.makeObjectArray(name, size, init); } } throw new SyntaxError(lex); }
private NewExpr parseNew(SymbolTable tbl) throws CompileError { ArrayInit init = null; int t = lex.lookAhead(); if (isBuiltinType(t)) { lex.get(); ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return new NewExpr(t, size, init); } else if (t == Identifier) { ASTList name = parseClassType(tbl); t = lex.lookAhead(); if (t == '(') { ASTList args = parseArgumentList(tbl); return new NewExpr(name, args); } else if (t == '[') { ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return NewExpr.makeObjectArray(name, size, init); } } throw new SyntaxError(lex); }
private NewExpr parseNew(SymbolTable tbl) throws CompileError { ArrayInit init = null; int t = lex.lookAhead(); if (isBuiltinType(t)) { lex.get(); ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return new NewExpr(t, size, init); } else if (t == Identifier) { ASTList name = parseClassType(tbl); t = lex.lookAhead(); if (t == '(') { ASTList args = parseArgumentList(tbl); return new NewExpr(name, args); } else if (t == '[') { ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return NewExpr.makeObjectArray(name, size, init); } } throw new SyntaxError(lex); }
private NewExpr parseNew(SymbolTable tbl) throws CompileError { ArrayInit init = null; int t = lex.lookAhead(); if (isBuiltinType(t)) { lex.get(); ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return new NewExpr(t, size, init); } else if (t == Identifier) { ASTList name = parseClassType(tbl); t = lex.lookAhead(); if (t == '(') { ASTList args = parseArgumentList(tbl); return new NewExpr(name, args); } else if (t == '[') { ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return NewExpr.makeObjectArray(name, size, init); } } throw new SyntaxError(lex); }
private NewExpr parseNew(SymbolTable tbl) throws CompileError { ArrayInit init = null; int t = lex.lookAhead(); if (isBuiltinType(t)) { lex.get(); ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return new NewExpr(t, size, init); } else if (t == Identifier) { ASTList name = parseClassType(tbl); t = lex.lookAhead(); if (t == '(') { ASTList args = parseArgumentList(tbl); return new NewExpr(name, args); } else if (t == '[') { ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return NewExpr.makeObjectArray(name, size, init); } } throw new SyntaxError(lex); }
private NewExpr parseNew(SymbolTable tbl) throws CompileError { ArrayInit init = null; int t = lex.lookAhead(); if (isBuiltinType(t)) { lex.get(); ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return new NewExpr(t, size, init); } else if (t == Identifier) { ASTList name = parseClassType(tbl); t = lex.lookAhead(); if (t == '(') { ASTList args = parseArgumentList(tbl); return new NewExpr(name, args); } else if (t == '[') { ASTList size = parseArraySize(tbl); if (lex.lookAhead() == '{') init = parseArrayInitializer(tbl); return NewExpr.makeObjectArray(name, size, init); } } throw new SyntaxError(lex); }