Class ParsableTerminalCSTNode

All Implemented Interfaces:
MoveCheckable, TreeMember, ParseTree, SyntaxTree, TerminalNode, Tree
Direct Known Subclasses:
Tensor

public abstract class ParsableTerminalCSTNode extends TerminalCSTNode
The parsable a CST node defines how CST nodes that can be converted back into parse tree nodes are handled. The construction of CST nodes can vary a lot and is not defined here.
  • Constructor Details

    • ParsableTerminalCSTNode

      public ParsableTerminalCSTNode()
  • Method Details

    • getOutputParseMethod

      protected abstract Function<io.github.douira.glsl_transformer.GLSLParser,ExtendedContext> getOutputParseMethod()
      This method is overwritten by the implementing class to specify with which parser method the generated string should be parsed.
      Returns:
      A method reference from GLSLParser
    • getParsed

      public ExtendedContext getParsed()
      Parses this CST node's generated code into a parse tree node without attaching a parent node.
      Returns:
      The CST node's code parsed into a node
      See Also:
    • getParsed

      public ExtendedContext getParsed(ExtendedContext parent)
      Parses the code generated by this CST node with the parser method supplied by getOutputParseMethod() into a parse tree node..
      Parameters:
      parent - The parent node to attach to the parsed node
      Returns:
      The CST node's code parsed into a node