public enum Symbol extends Enum<Symbol> implements TokenType, Keyword
Enum Constant and Description |
---|
AMP |
AT |
BANG |
BANG_EQ |
BANG_GT |
BANG_LT |
BAR |
CARET |
COLON |
COLON_EQ |
COMMA |
DOT |
DOUBLE_AMP |
DOUBLE_BAR |
DOUBLE_COLON |
DOUBLE_DOT |
DOUBLE_GT |
DOUBLE_LT |
EQ |
GT |
GT_EQ |
LEFT_BRACE |
LEFT_BRACKET |
LEFT_PAREN |
LT |
LT_EQ |
LT_EQ_GT |
LT_GT |
PERCENT |
PLUS |
POUND |
QUESTION |
RIGHT_BRACE |
RIGHT_BRACKET |
RIGHT_PAREN |
SEMI |
SLASH |
STAR |
SUB |
TILDE |
Modifier and Type | Method and Description |
---|---|
static Symbol |
literalsOf(String literals)
通过字面量查找词法符号.
|
static Symbol |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Symbol[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Symbol LEFT_PAREN
public static final Symbol RIGHT_PAREN
public static final Symbol LEFT_BRACE
public static final Symbol RIGHT_BRACE
public static final Symbol LEFT_BRACKET
public static final Symbol RIGHT_BRACKET
public static final Symbol SEMI
public static final Symbol COMMA
public static final Symbol DOT
public static final Symbol DOUBLE_DOT
public static final Symbol PLUS
public static final Symbol SUB
public static final Symbol STAR
public static final Symbol SLASH
public static final Symbol QUESTION
public static final Symbol EQ
public static final Symbol GT
public static final Symbol LT
public static final Symbol BANG
public static final Symbol TILDE
public static final Symbol CARET
public static final Symbol PERCENT
public static final Symbol COLON
public static final Symbol DOUBLE_COLON
public static final Symbol COLON_EQ
public static final Symbol LT_EQ
public static final Symbol GT_EQ
public static final Symbol LT_EQ_GT
public static final Symbol LT_GT
public static final Symbol BANG_EQ
public static final Symbol BANG_GT
public static final Symbol BANG_LT
public static final Symbol AMP
public static final Symbol BAR
public static final Symbol DOUBLE_AMP
public static final Symbol DOUBLE_BAR
public static final Symbol DOUBLE_LT
public static final Symbol DOUBLE_GT
public static final Symbol AT
public static final Symbol POUND
public static Symbol[] values()
for (Symbol c : Symbol.values()) System.out.println(c);
public static Symbol valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2018. All rights reserved.