private FieldDecl parseField(SymbolTable tbl, ASTList mods, Declarator d) throws CompileError { ASTree expr = null; if (lex.lookAhead() == '=') { lex.get(); expr = parseExpression(tbl); } int c = lex.get(); if (c == ';') return new FieldDecl(mods, new ASTList(d, new ASTList(expr))); else if (c == ',') throw new CompileError( "only one field can be declared in one declaration", lex); else throw new SyntaxError(lex); }
private FieldDecl parseField(SymbolTable tbl, ASTList mods, Declarator d) throws CompileError { ASTree expr = null; if (lex.lookAhead() == '=') { lex.get(); expr = parseExpression(tbl); } int c = lex.get(); if (c == ';') return new FieldDecl(mods, new ASTList(d, new ASTList(expr))); else if (c == ',') throw new CompileError( "only one field can be declared in one declaration", lex); else throw new SyntaxError(lex); }
private FieldDecl parseField(SymbolTable tbl, ASTList mods, Declarator d) throws CompileError { ASTree expr = null; if (lex.lookAhead() == '=') { lex.get(); expr = parseExpression(tbl); } int c = lex.get(); if (c == ';') return new FieldDecl(mods, new ASTList(d, new ASTList(expr))); else if (c == ',') throw new CompileError( "only one field can be declared in one declaration", lex); else throw new SyntaxError(lex); }
private FieldDecl parseField(SymbolTable tbl, ASTList mods, Declarator d) throws CompileError { ASTree expr = null; if (lex.lookAhead() == '=') { lex.get(); expr = parseExpression(tbl); } int c = lex.get(); if (c == ';') return new FieldDecl(mods, new ASTList(d, new ASTList(expr))); else if (c == ',') throw new CompileError( "only one field can be declared in one declaration", lex); else throw new SyntaxError(lex); }
private FieldDecl parseField(SymbolTable tbl, ASTList mods, Declarator d) throws CompileError { ASTree expr = null; if (lex.lookAhead() == '=') { lex.get(); expr = parseExpression(tbl); } int c = lex.get(); if (c == ';') return new FieldDecl(mods, new ASTList(d, new ASTList(expr))); else if (c == ',') throw new CompileError( "only one field can be declared in one declaration", lex); else throw new SyntaxError(lex); }
private FieldDecl parseField(SymbolTable tbl, ASTList mods, Declarator d) throws CompileError { ASTree expr = null; if (lex.lookAhead() == '=') { lex.get(); expr = parseExpression(tbl); } int c = lex.get(); if (c == ';') return new FieldDecl(mods, new ASTList(d, new ASTList(expr))); else if (c == ',') throw new CompileError( "only one field can be declared in one declaration", lex); else throw new SyntaxError(lex); }
private FieldDecl parseField(SymbolTable tbl, ASTList mods, Declarator d) throws CompileError { ASTree expr = null; if (lex.lookAhead() == '=') { lex.get(); expr = parseExpression(tbl); } int c = lex.get(); if (c == ';') return new FieldDecl(mods, new ASTList(d, new ASTList(expr))); else if (c == ',') throw new CompileError( "only one field can be declared in one declaration", lex); else throw new SyntaxError(lex); }