public enum TokenType extends Enum<TokenType>
Enum Constant and Description |
---|
BOOLEAN |
CLASS |
COMMENT |
EOF |
ERROR |
IDENTIFIER |
KEYWORD |
NULL |
NUMBER |
OPERATOR |
PUNCTUATION |
RAWSTRING |
STRING |
TEMPLATEPUNC |
TEMPLATESTRING |
WHITESPACE |
Modifier and Type | Method and Description |
---|---|
static boolean |
isBinary(char ch) |
static boolean |
isBoolean(String word) |
static boolean |
isClass(String word) |
static boolean |
isDigit(char ch) |
static boolean |
isHexCh(char ch) |
static boolean |
isKeyword(String word) |
static boolean |
isLineTerminator(char ch) |
static boolean |
isNull(String word) |
static boolean |
isOctal(char ch) |
static boolean |
isOperator(String word) |
static boolean |
isPartOfOperator(char ch) |
static boolean |
isPunctuation(char ch) |
static boolean |
partOfIdentifier(char ch) |
static boolean |
startsIdentifier(char ch) |
static TokenType |
valueOf(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.
|
public static final TokenType KEYWORD
public static final TokenType IDENTIFIER
public static final TokenType CLASS
public static final TokenType NUMBER
public static final TokenType BOOLEAN
public static final TokenType NULL
public static final TokenType STRING
public static final TokenType PUNCTUATION
public static final TokenType OPERATOR
public static final TokenType WHITESPACE
public static final TokenType COMMENT
public static final TokenType ERROR
public static final TokenType EOF
public static final TokenType RAWSTRING
public static final TokenType TEMPLATEPUNC
public static final TokenType TEMPLATESTRING
public static TokenType[] values()
for (TokenType c : TokenType.values()) System.out.println(c);
public static TokenType 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 nullpublic static boolean startsIdentifier(char ch)
public static boolean partOfIdentifier(char ch)
public static boolean isKeyword(String word)
public static boolean isNull(String word)
public static boolean isBoolean(String word)
public static boolean isClass(String word)
public static boolean isPunctuation(char ch)
public static boolean isPartOfOperator(char ch)
public static boolean isOperator(String word)
public static boolean isHexCh(char ch)
public static boolean isDigit(char ch)
public static boolean isBinary(char ch)
public static boolean isOctal(char ch)
public static boolean isLineTerminator(char ch)
Copyright © 2024. All rights reserved.