Enum Class TokenKind

java.lang.Object
java.lang.Enum<TokenKind>
com.oracle.js.parser.TokenKind
All Implemented Interfaces:
Serializable, Comparable<TokenKind>, Constable

public enum TokenKind extends Enum<TokenKind>
Classification of token types.
  • Enum Constant Details

    • SPECIAL

      public static final TokenKind SPECIAL
      Error, EOF, EOL...
    • UNARY

      public static final TokenKind UNARY
      Unary operators.
    • BINARY

      public static final TokenKind BINARY
      Binary operators.
    • BRACKET

      public static final TokenKind BRACKET
      [] () {}
    • KEYWORD

      public static final TokenKind KEYWORD
      String recognized as a keyword.
    • LITERAL

      public static final TokenKind LITERAL
      Literal constant.
    • IR

      public static final TokenKind IR
      IR only token.
    • FUTURE

      public static final TokenKind FUTURE
      Token reserved for future usage.
    • FUTURESTRICT

      public static final TokenKind FUTURESTRICT
      Token reserved for future in strict mode.
    • CONTEXTUAL

      public static final TokenKind CONTEXTUAL
      Identifier or contextual keyword.
  • 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