type Node

bolt@1.27.0.0 · src/syntax/tree.bend:33

import bolt@1.27.0.0/src/syntax/tree.bend as Tree
import Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex

33# a leaf holds one token; a group its bracket, what is inside, and its close
34# (None when it never closed); a statement its own tokens and the statements
35# under it; NNil and NCons chain nodes
36type Node is Data:
37  Leaf{tok: Lex.Tok}
38  Group{open: Lex.Tok, kids: Node, close: Maybe<&2, Lex.Tok>}
39  Stmt{kind: StmtKind, kids: Node, body: Node}
40  NNil{}
41  NCons{head: Node, tail: Node}

Uses (3)

Used by (238)