Package team.unnamed.mocha.lexer
Enum Class TokenKind.Tag
- All Implemented Interfaces:
Serializable,Comparable<TokenKind.Tag>,Constable
- Enclosing class:
- TokenKind
An enum of tags for token kinds. Tags specify
certain features of token kinds.
- Since:
- 3.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA token kind with HAS_VALUE tag will have a variable value, for example, double or string literal tokens have variable values, but they are still parsed with the same token kind. -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenKind.TagReturns the enum constant of this class with the specified name.static TokenKind.Tag[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HAS_VALUE
A token kind with HAS_VALUE tag will have a variable value, for example, double or string literal tokens have variable values, but they are still parsed with the same token kind.- Since:
- 3.0.0
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-