Class Directive
- All Implemented Interfaces:
MoveCheckable,TreeMember,ParseTree,SyntaxTree,TerminalNode,Tree
This class models unparsed directives with the # sign. Parsed directives are
modelled as regular parse tree nodes (for now).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe types of directives that can be generated. -
Field Summary
Fields inherited from class org.antlr.v4.runtime.tree.TerminalNodeImpl
parent, symbol -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new directive of the empty type.Directive(Directive.Type type, String content) Crates a new directive with the given directive type and content after the directive name. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGenerates the string representation of this AST object as it would be in the generated code.Methods inherited from class io.github.douira.glsl_transformer.ast.StringNode
getContentMethods inherited from class io.github.douira.glsl_transformer.ast.UnparsableASTNode
getTextMethods 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, 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
-
Directive
Crates a new directive with the given directive type and content after the directive name. Newlines in the content are escaped with GLSL's line continuation marker "\".- Parameters:
type- The type of the directive.content- The content to put after the directive name
-
Directive
public Directive()Creates a new directive of the empty type. It receives no content because it's not allowed to have content as per the GLSL spec.
-
-
Method Details
-
getPrinted
Description copied from class:ASTNodeGenerates the string representation of this AST object as it would be in the generated code.- Overrides:
getPrintedin classStringNode- Returns:
- The printed string for this AST object
-