Class ParsableASTNode
java.lang.Object
org.antlr.v4.runtime.tree.TerminalNodeImpl
io.github.douira.glsl_transformer.tree.ExtendedTerminalNode
io.github.douira.glsl_transformer.ast.ASTNode
io.github.douira.glsl_transformer.ast.ParsableASTNode
- All Implemented Interfaces:
MoveCheckable,TreeMember,ParseTree,SyntaxTree,TerminalNode,Tree
- Direct Known Subclasses:
Tensor
The parsable a AST node defines how AST nodes that can be converted back into
parse tree nodes are handled. The construction of AST 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 AST node's generated code into a parse tree node without attaching a parent node.getParsed(ExtendedContext parent) Parses the code generated by this AST node with the parser method supplied bygetOutputParseMethod()into a parse tree node..Methods inherited from class io.github.douira.glsl_transformer.ast.ASTNode
getPrintedMethods inherited from class io.github.douira.glsl_transformer.tree.ExtendedTerminalNode
getParent, getPreviousNode, omitTokens, 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
-
ParsableASTNode
public ParsableASTNode()
-
-
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 AST node's generated code into a parse tree node without attaching a parent node.- Returns:
- The AST node's code parsed into a node
- See Also:
-
getParsed
Parses the code generated by this AST 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 AST node's code parsed into a node
-