Enum Class TokenType

java.lang.Object
java.lang.Enum<TokenType>
technology.sola.script.tokenizer.TokenType
All Implemented Interfaces:
Serializable, Comparable<TokenType>, Constable

public enum TokenType extends Enum<TokenType>
TokenType contains all recognized token types for sola script.
  • Enum Constant Details

    • LEFT_PAREN

      public static final TokenType LEFT_PAREN
    • RIGHT_PAREN

      public static final TokenType RIGHT_PAREN
    • LEFT_BRACE

      public static final TokenType LEFT_BRACE
    • RIGHT_BRACE

      public static final TokenType RIGHT_BRACE
    • COMMA

      public static final TokenType COMMA
    • DOT

      public static final TokenType DOT
    • MINUS

      public static final TokenType MINUS
    • PLUS

      public static final TokenType PLUS
    • COLON

      public static final TokenType COLON
    • SEMICOLON

      public static final TokenType SEMICOLON
    • SLASH

      public static final TokenType SLASH
    • STAR

      public static final TokenType STAR
    • BANG

      public static final TokenType BANG
    • BANG_EQUAL

      public static final TokenType BANG_EQUAL
    • EQUAL

      public static final TokenType EQUAL
    • EQUAL_EQUAL

      public static final TokenType EQUAL_EQUAL
    • GREATER

      public static final TokenType GREATER
    • GREATER_EQUAL

      public static final TokenType GREATER_EQUAL
    • LESS

      public static final TokenType LESS
    • LESS_EQUAL

      public static final TokenType LESS_EQUAL
    • AMP_AMP

      public static final TokenType AMP_AMP
    • BAR_BAR

      public static final TokenType BAR_BAR
    • QUESTION

      public static final TokenType QUESTION
    • QUESTION_QUESTION

      public static final TokenType QUESTION_QUESTION
    • QUESTION_DOT

      public static final TokenType QUESTION_DOT
    • IDENTIFIER

      public static final TokenType IDENTIFIER
    • STRING

      public static final TokenType STRING
    • NUMBER

      public static final TokenType NUMBER
    • FUN

      public static final TokenType FUN
    • VAR

      public static final TokenType VAR
    • VAL

      public static final TokenType VAL
    • ELSE

      public static final TokenType ELSE
    • FOR

      public static final TokenType FOR
    • IF

      public static final TokenType IF
    • RETURN

      public static final TokenType RETURN
    • WHILE

      public static final TokenType WHILE
    • FALSE

      public static final TokenType FALSE
    • NULL

      public static final TokenType NULL
    • TRUE

      public static final TokenType TRUE
    • EOF

      public static final TokenType EOF
  • Method Details

    • values

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