Class Modifiers

java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.Modifiers

public final class Modifiers extends Node
Represents a layout block and a set of modifier keywords (in, out, uniform, etc.) appearing before a variable or interface block declaration, as in:
 layout(location = 2) smooth in float2 v_TexCoord;
 layout(binding = 1, set = 0) uniform UniformBlock {
     float u_Radius;
 };
 
  • Field Details

  • Constructor Details

    • Modifiers

      public Modifiers(int position)
  • Method Details

    • describeFlag

      public static String describeFlag(int flag)
    • layout

      public Layout layout()
    • layoutFlags

      public int layoutFlags()
    • setLayoutFlag

      public void setLayoutFlag(@Nonnull Context context, int mask, String name, int pos)
    • clearLayoutFlag

      public void clearLayoutFlag(int mask)
    • checkLayoutFlags

      public boolean checkLayoutFlags(@Nonnull Context context, int permittedLayoutFlags)
    • flags

      public int flags()
    • setFlag

      public void setFlag(@Nonnull Context context, int mask, int pos)
    • clearFlag

      public void clearFlag(int mask)
    • checkFlags

      public boolean checkFlags(@Nonnull Context context, int permittedFlags)
    • isConst

      public boolean isConst()
    • isUniform

      public boolean isUniform()
    • isBuffer

      public boolean isBuffer()
    • layoutOffset

      public int layoutOffset()
    • layoutBuiltin

      public int layoutBuiltin()
    • accept

      public boolean accept(@Nonnull TreeVisitor visitor)
      Description copied from class: Node
      Visit this AST with a given visitor.
      Specified by:
      accept in class Node
      Returns:
      true to stop recursion and propagate true up the stack, false to continue
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      @Nonnull public String toString()
      Specified by:
      toString in class Node
      Returns:
      a string representation of this AST node
    • describeFlags

      public static String describeFlags(int flags)
    • describeFlags

      public static String describeFlags(int flags, boolean padded)