Skip to main content

Module arena_node

Module arena_node 

Source
Expand description

Port of src/ast/arena-node.ts: object view of an arena node or token.

The properties (typ, nam, sel, val, chi, tokens, unit, cal, attr, kin, sign, op, op1, op2, l, r, loc, state, errors, parent) are read and written in the arena: nothing is copied. The javascript AstArenaNode class forwards each getter / setter to AstArenaNode::get / AstArenaNode::set and wraps the node ids it receives in views, lazily.

Structs§

AstArenaNode
object view of an arena node or token

Enums§

NodeInput
value assigned to a view property (AstArenaNodeInput, strings, numbers)
NodeValue
value read from a view

Constants§

ARENA
ARENAID
keyed symbol names (Symbol.for()) of the view properties

Functions§

to_ids
convert setter values to node ids of the arena: ids are used as is, plain objects are allocated