Skip to contents
  • ast_new() instantiates a new AST

  • ast_id() returns the unique id of the AST

  • ast_size() returns the number of nodes in the AST

  • ast_root_get() returns the root node of _NODE_.

  • ast_root_set() sets the new root and deletes the old root.

  • ast_root_rep() sets the new root and returns the old root.

Usage

ast_new(capacity = 10000L)

ast_id(ast)

ast_size(ast)

ast_root_get(ast)

ast_root_rep(ast, root)

ast_root_set(ast, root)

Arguments

capacity

expected size of AST; size will increase dynamically if more nodes are added

ast

AST object

root

Root node