Class GlslNodeVisitor

java.lang.Object
io.github.ocelot.glslprocessor.api.visitor.GlslNodeVisitor
Direct Known Subclasses:
GlslNodeStringWriter

@Experimental public class GlslNodeVisitor extends Object
Since:
1.0.0
  • Constructor Details

    • GlslNodeVisitor

      public GlslNodeVisitor()
    • GlslNodeVisitor

      public GlslNodeVisitor(@Nullable @Nullable GlslNodeVisitor parent)
  • Method Details

    • visitForLoop

      @Nullable public @Nullable GlslNodeVisitor visitForLoop(GlslForLoopNode node)
      Visits the specified for loop node.
      Parameters:
      node - The node to visit
      Returns:
      A visitor for the body or null to skip
    • visitForLoopEnd

      public void visitForLoopEnd(GlslForLoopNode node)
      Visits the end of the specified for loop node.
      Parameters:
      node - The node to visit
    • visitWhileLoop

      @Nullable public @Nullable GlslNodeVisitor visitWhileLoop(GlslWhileLoopNode node)
      Visits the specified while loop node.
      Parameters:
      node - The node to visit
      Returns:
      A visitor for the body or null to skip
    • visitWhileLoopEnd

      public void visitWhileLoopEnd(GlslWhileLoopNode node)
      Visits the end of the specified while loop node.
      Parameters:
      node - The node to visit
    • visitJump

      public void visitJump(GlslJumpNode node)
      Visits the specified jump node.
      Parameters:
      node - The node to visit
    • visitReturn

      public void visitReturn(GlslReturnNode node)
      Visits the specified return node.
      Parameters:
      node - The node to visit
    • visitIf

      @Nullable public @Nullable GlslIfVisitor visitIf(GlslIfNode node)
      Visits the specified if statement.
      Parameters:
      node - The node to visit
      Returns:
      A visitor for the body or null to skip
    • visitSwitch

      @Nullable public @Nullable GlslSwitchVisitor visitSwitch(GlslSwitchNode node)
      Visits the specified switch statement.
      Parameters:
      node - The node to visit
      Returns:
      A visitor for the body or null to skip
    • visitBitwise

      @Nullable public @Nullable GlslBitwiseVisitor visitBitwise(GlslBitwiseNode node)
      Visits the specified bitwise statement.
      Parameters:
      node - The node to visit
      Returns:
      A visitor for the body or null to skip
    • visitAssign

      public void visitAssign(GlslAssignmentNode node)
      Visits the specified assignment statement.
      Parameters:
      node - The node to visit
    • visitOperation

      public void visitOperation(GlslOperationNode node)
      Visits the specified operation statement.
      Parameters:
      node - The node to visit
    • visitCompare

      public void visitCompare(GlslCompareNode node)
      Visits the specified compare statement.
      Parameters:
      node - The node to visit
    • visitCondition

      public void visitCondition(GlslConditionalNode node)
      Visits the specified condition statement.
      Parameters:
      node - The node to visit
    • visitPrecision

      public void visitPrecision(GlslPrecisionNode node)
      Visits the specified precision statement.
      Parameters:
      node - The node to visit
    • visitUnary

      public void visitUnary(GlslUnaryNode node)
      Visits the specified unary statement.
      Parameters:
      node - The node to visit
    • visitFunctionInvocation

      @Nullable public @Nullable GlslInvokeVisitor visitFunctionInvocation(GlslInvokeFunctionNode node)
      Visits the specified function invocation statement.
      Parameters:
      node - The node to visit
      Returns:
      A visitor for the name and parameters or null to skip
    • visitPrimitiveConstructor

      public void visitPrimitiveConstructor(GlslPrimitiveConstructorNode node)
      Visits the specified primitive constructor statement.
      Parameters:
      node - The node to visit
    • visitConstant

      public void visitConstant(GlslConstantNode node)
      Visits the specified constant statement.
      Parameters:
      node - The node to visit
    • visitVariableDeclaration

      public void visitVariableDeclaration(GlslVariableDeclarationNode node)
      Visits the specified variable statement.
      Parameters:
      node - The node to visit
    • visitGetArray

      public void visitGetArray(GlslGetArrayNode node)
      Visits the specified array index get statement.
      Parameters:
      node - The node to visit
    • visitGetField

      public void visitGetField(GlslGetFieldNode node)
      Visits the specified field get statement.
      Parameters:
      node - The node to visit
    • visitNewField

      public void visitNewField(GlslNewFieldNode node)
      Visits the specified new field statement.
      Parameters:
      node - The node to visit
    • visitStructDeclaration

      public void visitStructDeclaration(GlslStructDeclarationNode node)
      Visits the specified struct statement.
      Parameters:
      node - The node to visit
    • visitVariable

      public void visitVariable(GlslVariableNode node)
      Visits the specified variable statement.
      Parameters:
      node - The node to visit