1617181920212223242526
} public ASTPrimitiveType(final BaseType baseType) { this(JavaParserTreeConstants.JJTPRIMITIVETYPE); final Token token = new Token(); switch (baseType) { case BOOLEAN: token.image = "boolean"; token.kind = JavaParserConstants.BOOLEAN;
2324252627282930313233
return visitor.visit(this, data); } public AssignmentOperator getOperator() { final Token token = jjtGetFirstToken(); switch (token.kind) { case JavaParserConstants.ASSIGN: return AssignmentOperator.ASSIGN; case JavaParserConstants.STARASSIGN:
4647484950515253545556
} } public IntegerValue getValue() { final Token token = jjtGetFirstToken(); boolean isLong = false; String image = token.image; if (image.endsWith("l") || image.endsWith("L")) { isLong = true;
322323324325326327328329330331332
public CharSequence getDebugInfo() { StringBuilder builder = new StringBuilder(toString()); builder.append("(@"); final Token token = jjtGetFirstToken(); if (token == null) { builder.append("?)"); return builder; }
353354355356357358359360361362363
} @Override public Token next() { Token tok = _next; if (tok == null) { throw new NoSuchElementException(); } if (_next == _last)
282283284285286287288289290291
} } protected Token makeToken(final int kind, final String image) { final Token token = new Token(); token.image = image; token.kind = kind; return token; }
123124125126127128129130131132133
return null; } private void printSpecial(final PrintStream out, final HasTokens node) { final Token token = node.jjtGetFirstToken(); if (token == null) { return; } for (Token special = token.specialToken; special != null; special = special.next)
3839404142434445464748
return visitor.visit(this, data); } public UnaryOperator getOperator() { final Token token = jjtGetFirstToken(); switch (token.kind) { case JavaParserConstants.PLUS: return UnaryOperator.POSITIVE; case JavaParserConstants.MINUS:
return visitor.visit(this, data); } public BinaryOperator getOperator() { final Token token = jjtGetFirstToken(); switch (token.kind) { case JavaParser.EQ: return BinaryOperator.EQUAL; case JavaParser.NE:
1415161718192021222324
public ASTMethodBody(final ASTBlock block) { this(JavaParserTreeConstants.JJTMETHODBODY); appendChild(block); Token token = block.jjtGetFirstToken(); if (token == null) { token = makeToken(JavaParserConstants.LBRACE, "{"); } jjtSetFirstToken(token);