Enum Class TokenChannel

java.lang.Object
java.lang.Enum<TokenChannel>
io.github.douira.glsl_transformer.print.filter.TokenChannel
All Implemented Interfaces:
Serializable, Comparable<TokenChannel>, Constable

public enum TokenChannel extends Enum<TokenChannel>
A list of the possible channels a token can have. This must correspond to the generated Lexer's channelNames array.
  • Enum Constant Details

    • DEFAULT

      public static final TokenChannel DEFAULT
      The default channel
    • HIDDEN

      public static final TokenChannel HIDDEN
      The default hidden channel
    • WHITESPACE

      public static final TokenChannel WHITESPACE
      The custom whitespace channel
    • COMMENTS

      public static final TokenChannel COMMENTS
      The custom comments channel
    • PREPROCESSOR

      public static final TokenChannel PREPROCESSOR
      The custom preprocessor channel
  • Method Details

    • values

      public static TokenChannel[] 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 TokenChannel 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
    • getTokenChannel

      public static TokenChannel getTokenChannel(Token token)
      Returns the channel enum for this token's integer channel number.
      Parameters:
      token - The token to get the channel of
      Returns:
      The channel of the token