Class Node

java.lang.Object
icyllis.arc3d.compiler.tree.Node
Direct Known Subclasses:
Expression, Modifiers, Statement, Symbol, TopLevelElement, TranslationUnit

public abstract class Node extends Object
Represents a node in the AST. The AST is a fully-resolved version of the program (all types determined, everything validated), ready for code generation.
  • Field Details

    • mPosition

      public int mPosition
      Position of this element within the module being compiled, for error reporting purposes.
      See Also:
  • Constructor Details

    • Node

      protected Node(int position)
  • Method Details

    • getStartOffset

      public final int getStartOffset()
    • getEndOffset

      public final int getEndOffset()
    • accept

      public abstract boolean accept(@Nonnull TreeVisitor visitor)
      Visit this AST with a given visitor.
      Returns:
      true to stop recursion and propagate true up the stack, false to continue
    • toString

      @Nonnull public abstract String toString()
      Overrides:
      toString in class Object
      Returns:
      a string representation of this AST node