Package jminusminus
Enum Class TokenKind
- All Implemented Interfaces:
Serializable
,Comparable<TokenKind>
,java.lang.constant.Constable
An enum of token kinds. Each entry in this enum represents the kind of a token along with its
image (string representation).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionimage()
Returns the token kind's image.tokenRep()
Returns the token kind's string representation.static TokenKind
Returns the enum constant of this class with the specified name.static TokenKind[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EOF
-
ABSTRACT
-
BOOLEAN
-
CHAR
-
CLASS
-
ELSE
-
EXTENDS
-
IF
-
IMPORT
-
INSTANCEOF
-
INT
-
NEW
-
PACKAGE
-
PRIVATE
-
PROTECTED
-
PUBLIC
-
RETURN
-
STATIC
-
SUPER
-
THIS
-
VOID
-
WHILE
-
ASSIGN
-
DEC
-
EQUAL
-
GT
-
INC
-
LAND
-
LE
-
LNOT
-
MINUS
-
PLUS
-
PLUS_ASSIGN
-
STAR
-
COMMA
-
DOT
-
LBRACK
-
LCURLY
-
LPAREN
-
RBRACK
-
RCURLY
-
RPAREN
-
SEMI
-
IDENTIFIER
-
CHAR_LITERAL
-
FALSE
-
INT_LITERAL
-
NULL
-
STRING_LITERAL
-
TRUE
-
-
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
-
tokenRep
Returns the token kind's string representation.- Returns:
- the token kind's string representation.
-
image
Returns the token kind's image.- Returns:
- the token kind's image.
-