Package jminusminus

Enum Class TokenKind

java.lang.Object
java.lang.Enum<TokenKind>
jminusminus.TokenKind
All Implemented Interfaces:
Serializable, Comparable<TokenKind>, java.lang.constant.Constable

enum TokenKind extends Enum<TokenKind>
An enum of token kinds. Each entry in this enum represents the kind of a token along with its image (string representation).
  • Enum Constant Details

    • EOF

      public static final TokenKind EOF
    • ABSTRACT

      public static final TokenKind ABSTRACT
    • BOOLEAN

      public static final TokenKind BOOLEAN
    • CHAR

      public static final TokenKind CHAR
    • CLASS

      public static final TokenKind CLASS
    • ELSE

      public static final TokenKind ELSE
    • EXTENDS

      public static final TokenKind EXTENDS
    • IF

      public static final TokenKind IF
    • IMPORT

      public static final TokenKind IMPORT
    • INSTANCEOF

      public static final TokenKind INSTANCEOF
    • INT

      public static final TokenKind INT
    • NEW

      public static final TokenKind NEW
    • PACKAGE

      public static final TokenKind PACKAGE
    • PRIVATE

      public static final TokenKind PRIVATE
    • PROTECTED

      public static final TokenKind PROTECTED
    • PUBLIC

      public static final TokenKind PUBLIC
    • RETURN

      public static final TokenKind RETURN
    • STATIC

      public static final TokenKind STATIC
    • SUPER

      public static final TokenKind SUPER
    • THIS

      public static final TokenKind THIS
    • VOID

      public static final TokenKind VOID
    • WHILE

      public static final TokenKind WHILE
    • ASSIGN

      public static final TokenKind ASSIGN
    • DEC

      public static final TokenKind DEC
    • EQUAL

      public static final TokenKind EQUAL
    • GT

      public static final TokenKind GT
    • INC

      public static final TokenKind INC
    • LAND

      public static final TokenKind LAND
    • LE

      public static final TokenKind LE
    • LNOT

      public static final TokenKind LNOT
    • MINUS

      public static final TokenKind MINUS
    • PLUS

      public static final TokenKind PLUS
    • PLUS_ASSIGN

      public static final TokenKind PLUS_ASSIGN
    • STAR

      public static final TokenKind STAR
    • COMMA

      public static final TokenKind COMMA
    • DOT

      public static final TokenKind DOT
    • LBRACK

      public static final TokenKind LBRACK
    • LCURLY

      public static final TokenKind LCURLY
    • LPAREN

      public static final TokenKind LPAREN
    • RBRACK

      public static final TokenKind RBRACK
    • RCURLY

      public static final TokenKind RCURLY
    • RPAREN

      public static final TokenKind RPAREN
    • SEMI

      public static final TokenKind SEMI
    • IDENTIFIER

      public static final TokenKind IDENTIFIER
    • CHAR_LITERAL

      public static final TokenKind CHAR_LITERAL
    • FALSE

      public static final TokenKind FALSE
    • INT_LITERAL

      public static final TokenKind INT_LITERAL
    • NULL

      public static final TokenKind NULL
    • STRING_LITERAL

      public static final TokenKind STRING_LITERAL
    • TRUE

      public static final TokenKind TRUE
  • Method Details

    • values

      public static TokenKind[] 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

      public static TokenKind valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • tokenRep

      public String tokenRep()
      Returns the token kind's string representation.
      Returns:
      the token kind's string representation.
    • image

      public String image()
      Returns the token kind's image.
      Returns:
      the token kind's image.