Class Directive

All Implemented Interfaces:
MoveCheckable, TreeMember, ParseTree, SyntaxTree, TerminalNode, Tree

public class Directive extends StringNode
This class models unparsed directives with the # sign. Parsed directives are modelled as regular parse tree nodes (for now).
  • Constructor Details

    • Directive

      public Directive(Directive.Type type, String content)
      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

      protected String getPrinted()
      Description copied from class: ASTNode
      Generates the string representation of this AST object as it would be in the generated code.
      Overrides:
      getPrinted in class StringNode
      Returns:
      The printed string for this AST object