Search


Search something to see results

AstNode

AstNode: number

Ast nodes are integer ids of records stored in an AstArena.

  • arena.getType(node) is the node type (EnumToken),
  • arena.getName(node) is the name of declarations / at-rules and the selector of rules,
  • arena.getValue(node) is the string value of at-rules and comments,
  • arena.tokens(node) (arena.getFirstToken(node) ... arena.getLastToken(node)) are the declaration value tokens or the rule selector / at-rule prelude tokens,
  • arena.getFlags(node) holds the validation state (EnumAstNodeStatus) and the node flags,
  • arena.getFirstChild(node), arena.getLastChild(node), arena.getNextSibling(node), arena.getPreviousSibling(node) and arena.getParent(node) link the tree.