Interface GlslNode

All Known Subinterfaces:
GlslConstantNode, GlslRootNode
All Known Implementing Classes:
ForLoopNode, GlslAndNode, GlslArrayNode, GlslAssignmentNode, GlslBoolConstantNode, GlslCaseLabelNode, GlslCompareNode, GlslCompoundNode, GlslConditionalNode, GlslDeclarationNode, GlslDoubleConstantNode, GlslEmptyNode, GlslExclusiveOrNode, GlslFieldNode, GlslFloatConstantNode, GlslFunctionNode, GlslInclusiveOrNode, GlslIntConstantNode, GlslInvokeFunctionNode, GlslLogicalAndNode, GlslLogicalOrNode, GlslLogicalXorNode, GlslNewNode, GlslOperationNode, GlslPrecisionNode, GlslPrimitiveConstructorNode, GlslReturnNode, GlslSelectionNode, GlslStructNode, GlslSwitchNode, GlslUnaryNode, GlslVariableNode, JumpNode, WhileLoopNode

public interface GlslNode
  • Field Details

    • NEWLINE

      static final Pattern NEWLINE
  • Method Details

    • getSourceString

      String getSourceString()
    • getType

      @Nullable default @Nullable GlslSpecifiedType getType()
      Returns:
      The type of this node if it is a field
    • toList

      default List<GlslNode> toList()
      Returns:
      A new list with the child contents of this node
    • getBody

      @Nullable default @Nullable GlslNodeList getBody()
      Returns:
      The body of this node or null if there is no sub-body in this node
    • setBody

      default boolean setBody(Collection<GlslNode> body)
      Sets the body of this node.
      Parameters:
      body - The new body
      Returns:
      Whether the action was successful
    • setBody

      default boolean setBody(GlslNode... body)
      Sets the body of this node.
      Parameters:
      body - The new body
      Returns:
      Whether the action was successful
    • stream

      Stream<GlslNode> stream()
    • intConstant

      static GlslIntConstantNode intConstant(int value)
    • unsignedIntConstant

      static GlslIntConstantNode unsignedIntConstant(int value)
    • floatConstant

      static GlslFloatConstantNode floatConstant(float value)
    • doubleConstant

      static GlslDoubleConstantNode doubleConstant(double value)
    • booleanConstant

      static GlslBoolConstantNode booleanConstant(boolean value)
    • compound

      static GlslNode compound(Collection<GlslNode> nodes)
    • compound

      static GlslNode compound(GlslNode... nodes)