Package icyllis.arc3d.compiler.tree

# 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.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `Node.ElementKind`
  `static enum`
  `Node.ExpressionKind`
  `static enum`
  `Node.StatementKind`
  `static enum`
  `Node.SymbolKind`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `mPosition`
  Position of this element within the module being compiled, for error reporting purposes.

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Node(int position)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract boolean`
  `accept(TreeVisitor visitor)`
  Visit this AST with a given visitor.
  `final int`
  `getEndOffset()`
  `final int`
  `getStartOffset()`
  `abstract String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### mPosition

    public int mPosition
    Position of this element within the module being compiled, for error reporting purposes.
    See Also:
      - `Position.range(int, int)`

- ## 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