Enum Class TokenKind.Tag

java.lang.Object
java.lang.Enum<TokenKind.Tag>
team.unnamed.mocha.lexer.TokenKind.Tag
All Implemented Interfaces:
Serializable, Comparable<TokenKind.Tag>, Constable
Enclosing class:
TokenKind

public static enum TokenKind.Tag extends Enum<TokenKind.Tag>
An enum of tags for token kinds. Tags specify certain features of token kinds.
Since:
3.0.0
  • Enum Constant Details

    • HAS_VALUE

      public static final TokenKind.Tag 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

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