Package manifold.js.rt.parser
Enum TokenType
- java.lang.Object
-
- java.lang.Enum<TokenType>
-
- manifold.js.rt.parser.TokenType
-
- All Implemented Interfaces:
Serializable,Comparable<TokenType>
public enum TokenType extends Enum<TokenType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANCLASSCOMMENTEOFERRORIDENTIFIERKEYWORDNULLNUMBEROPERATORPUNCTUATIONRAWSTRINGSTRINGTEMPLATEPUNCTEMPLATESTRINGWHITESPACE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisBinary(char ch)static booleanisBoolean(String word)static booleanisClass(String word)static booleanisDigit(char ch)static booleanisHexCh(char ch)static booleanisKeyword(String word)static booleanisLineTerminator(char ch)static booleanisNull(String word)static booleanisOctal(char ch)static booleanisOperator(String word)static booleanisPartOfOperator(char ch)static booleanisPunctuation(char ch)static booleanpartOfIdentifier(char ch)static booleanstartsIdentifier(char ch)static TokenTypevalueOf(String name)Returns the enum constant of this type with the specified name.static TokenType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
KEYWORD
public static final TokenType KEYWORD
-
IDENTIFIER
public static final TokenType IDENTIFIER
-
CLASS
public static final TokenType CLASS
-
NUMBER
public static final TokenType NUMBER
-
BOOLEAN
public static final TokenType BOOLEAN
-
NULL
public static final TokenType NULL
-
STRING
public static final TokenType STRING
-
PUNCTUATION
public static final TokenType PUNCTUATION
-
OPERATOR
public static final TokenType OPERATOR
-
WHITESPACE
public static final TokenType WHITESPACE
-
COMMENT
public static final TokenType COMMENT
-
ERROR
public static final TokenType ERROR
-
EOF
public static final TokenType EOF
-
RAWSTRING
public static final TokenType RAWSTRING
-
TEMPLATEPUNC
public static final TokenType TEMPLATEPUNC
-
TEMPLATESTRING
public static final TokenType TEMPLATESTRING
-
-
Method Detail
-
values
public static TokenType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TokenType c : TokenType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TokenType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
startsIdentifier
public static boolean startsIdentifier(char ch)
-
partOfIdentifier
public static boolean partOfIdentifier(char ch)
-
isKeyword
public static boolean isKeyword(String word)
-
isNull
public static boolean isNull(String word)
-
isBoolean
public static boolean isBoolean(String word)
-
isClass
public static boolean isClass(String word)
-
isPunctuation
public static boolean isPunctuation(char ch)
-
isPartOfOperator
public static boolean isPartOfOperator(char ch)
-
isOperator
public static boolean isOperator(String word)
-
isHexCh
public static boolean isHexCh(char ch)
-
isDigit
public static boolean isDigit(char ch)
-
isBinary
public static boolean isBinary(char ch)
-
isOctal
public static boolean isOctal(char ch)
-
isLineTerminator
public static boolean isLineTerminator(char ch)
-
-