Class ParsableTerminalCSTNode
java.lang.Object
org.antlr.v4.runtime.tree.TerminalNodeImpl
io.github.douira.glsl_transformer.tree.ExtendedTerminalNode
io.github.douira.glsl_transformer.cst.node.TerminalCSTNode
io.github.douira.glsl_transformer.cst.node.ParsableTerminalCSTNode
- All Implemented Interfaces:
MoveCheckable,TreeMember,ParseTree,SyntaxTree,TerminalNode,Tree
- Direct Known Subclasses:
Tensor
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.
-
Field Summary
Fields inherited from class org.antlr.v4.runtime.tree.TerminalNodeImpl
parent, symbol -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Function<io.github.douira.glsl_transformer.GLSLParser,ExtendedContext> This method is overwritten by the implementing class to specify with which parser method the generated string should be parsed.Parses this CST node's generated code into a parse tree node without attaching a parent node.getParsed(ExtendedContext parent) Parses the code generated by this CST node with the parser method supplied bygetOutputParseMethod()into a parse tree node..Methods inherited from class io.github.douira.glsl_transformer.cst.node.TerminalCSTNode
getPrintedMethods inherited from class io.github.douira.glsl_transformer.tree.ExtendedTerminalNode
getParent, getPreviousNode, processRemoval, setPreviousNodeMethods inherited from class org.antlr.v4.runtime.tree.TerminalNodeImpl
accept, getChild, getChildCount, getPayload, getSourceInterval, getSymbol, getText, setParent, toString, toStringTree, toStringTreeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.antlr.v4.runtime.tree.ParseTree
accept, getChild, getText, setParent, toStringTreeMethods inherited from interface org.antlr.v4.runtime.tree.SyntaxTree
getSourceIntervalMethods inherited from interface org.antlr.v4.runtime.tree.Tree
getChildCount, getPayload, toStringTree
-
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
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
Parses the code generated by this CST node with the parser method supplied bygetOutputParseMethod()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
-