Class StringNode
java.lang.Object
org.antlr.v4.runtime.tree.TerminalNodeImpl
io.github.douira.glsl_transformer.generic.ExtendedTerminalNode
io.github.douira.glsl_transformer.ast.ASTNode
io.github.douira.glsl_transformer.ast.UnparsableASTNode
io.github.douira.glsl_transformer.ast.StringNode
- All Implemented Interfaces:
TreeMember,org.antlr.v4.runtime.tree.ParseTree,org.antlr.v4.runtime.tree.SyntaxTree,org.antlr.v4.runtime.tree.TerminalNode,org.antlr.v4.runtime.tree.Tree
- Direct Known Subclasses:
Directive
String node provides a terminal node with arbitrary contents. This is useful
for inserting strings into the printed code such as comments.
Only use this terminal node for non-parsed tokens like comments, whitespace
or preprocessor directives. For all other syntax features, use the local
roots system. Parse tree search doesn't work inside string nodes as they are
not parsed.
- See Also:
-
Field Summary
Fields inherited from class org.antlr.v4.runtime.tree.TerminalNodeImpl
parent, symbol -
Constructor Summary
ConstructorsConstructorDescriptionStringNode(String content) Creates a new string node with the given string content. -
Method Summary
Methods inherited from class io.github.douira.glsl_transformer.ast.UnparsableASTNode
getTextMethods inherited from class io.github.douira.glsl_transformer.generic.ExtendedTerminalNode
getParent, omitTokensMethods inherited from class org.antlr.v4.runtime.tree.TerminalNodeImpl
accept, getChild, getChildCount, getPayload, getSourceInterval, getSymbol, 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, 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
-
StringNode
Creates a new string node with the given string content.- Parameters:
content- The string to create a token for
-
-
Method Details
-
getPrinted
Description copied from class:ASTNodeGenerates the string representation of this AST object as it would be in the generated code.- Specified by:
getPrintedin classASTNode- Returns:
- The printed string for this AST object
-
getContent
Returns the string node's content.- Returns:
- The content
-