Enum Class TokenKind
- All Implemented Interfaces:
Serializable, Comparable<TokenKind>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA line or block comment.A decimal number with digits on both sides of the point, e.g.,19.99.The end of a block of indented lines, an empty span: the closing brace thatLayoutinserts.A double, a decimal number with an exponent, e.g.,1.2e2or1.0e-2, as the compiler prints adoubleliteral.The end of the input, an empty span after the last character.Text that is not a token, e.g., an unexpected character or an unterminated string.The start of a block of indented lines, an empty span: the opening brace thatLayoutinserts.A natural number, e.g.,16.A reserved word of the full language, e.g.,abstract,someorX(ClaferLexer): it cannot name a clafer.The separator thatLayoutinserts between two lines at the same indentation, an empty span, so that, e.g., a group cardinality at the start of a line is not the cardinality of the clafer on the line before.A string literal with its quotes and escapes as written, e.g.,"a\"b"; seeLexer.unescape(String).An operator or punctuation, e.g.,->>,..or a brace.A name or a keyword, e.g.,c0_cost,abstract,int: keywords are recognized by the parser where they are expected, so a clafer may be named like one. -
Method Summary
-
Enum Constant Details
-
WORD
-
INT
-
DECIMAL
-
DOUBLE
-
STRING
A string literal with its quotes and escapes as written, e.g.,"a\"b"; seeLexer.unescape(String). -
SYMBOL
-
COMMENT
-
ERROR
-
KEYWORD
A reserved word of the full language, e.g.,abstract,someorX(ClaferLexer): it cannot name a clafer. The explicit languages have none (WORD). -
ESCAPE
-
INDENT
-
DEDENT
-
SEPARATOR
-
EOF
-
-
Method Details
-
values
-
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
-