Package icyllis.arc3d.compiler.tree

# Class FunctionDefinition

java.lang.Object
icyllis.arc3d.compiler.tree.Node
icyllis.arc3d.compiler.tree.TopLevelElement
icyllis.arc3d.compiler.tree.FunctionDefinition

public final class FunctionDefinition extends TopLevelElement
A function definition (a function declaration plus an associated block of code).

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class icyllis.arc3d.compiler.tree.Node

  `Node.ElementKind, Node.ExpressionKind, Node.StatementKind, Node.SymbolKind`

- ## Field Summary

  ### Fields inherited from class icyllis.arc3d.compiler.tree.Node

  `mPosition`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(TreeVisitor visitor)`
  Visit this AST with a given visitor.
  `static FunctionDefinition`
  `convert(Context context, int pos, FunctionDecl functionDecl, boolean builtin, Statement body)`
  `BlockStatement`
  `getBody()`
  `FunctionDecl`
  `getFunctionDecl()`
  `Node.ElementKind`
  `getKind()`
  `boolean`
  `isBuiltin()`
  `static FunctionDefinition`
  `make(int pos, FunctionDecl functionDecl, boolean builtin, BlockStatement body)`
  `void`
  `setBody(BlockStatement body)`
  `String`
  `toString()`

  ### Methods inherited from class icyllis.arc3d.compiler.tree.Node

  `getEndOffset, getStartOffset`

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

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

- ## Method Details

  - ### convert

    public static FunctionDefinition convert(@Nonnull Context context, int pos, FunctionDecl functionDecl, boolean builtin, Statement body)

  - ### make

    public static FunctionDefinition make(int pos, FunctionDecl functionDecl, boolean builtin, BlockStatement body)

  - ### getFunctionDecl

    public FunctionDecl getFunctionDecl()

  - ### isBuiltin

    public boolean isBuiltin()

  - ### getBody

    public BlockStatement getBody()

  - ### setBody

    public void setBody(BlockStatement body)

  - ### getKind

    public Node.ElementKind getKind()
    Specified by:
      `getKind` in class `TopLevelElement`
    See Also:
      - `Node.ElementKind`

  - ### accept

    public boolean accept(@Nonnull TreeVisitor visitor)
    Description copied from class: `Node`
    Visit this AST with a given visitor.
    Specified by:
      `accept` in class `Node`
    Returns:
      true to stop recursion and propagate true up the stack, false to continue

  - ### toString

    @Nonnull public String toString()
    Specified by:
      `toString` in class `Node`
    Returns:
      a string representation of this AST node