Enum Class TokenRole

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

public enum TokenRole extends Enum<TokenRole>
How important a token is to include in the output and why it exists in the token stream.
  • Enum Constant Details

    • EXACT

      public static final TokenRole EXACT
      Required tokens must be printed to the output as they are.
    • EXTENDABLE_SPACE

      public static final TokenRole EXTENDABLE_SPACE
      Required spaces that can be converted to more whitespace but not other kinds of whitespace.
    • BREAKABLE_SPACE

      public static final TokenRole BREAKABLE_SPACE
      Required spaces that may be converted to a line break and other additional whitespace if necessary to shorten a line.
    • COMMON_FORMATTING

      public static final TokenRole COMMON_FORMATTING
      Optional tokens that can be printed to the output if standard line breaks between statements and other common locations are desired. May be extended by additional whitespace for formatting.
  • Field Details

    • DEFAULT

      public static final TokenRole DEFAULT
  • Method Details

    • values

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