def leaf_close

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

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

98# the leaves of a tree, in order: the significant tokens
99def leaf_close(close: Maybe<&2, Lex.Tok>, acc: List<&2, Lex.Tok>) -> List<&2, Lex.Tok>:
100  match close:
101    case None{}:
102      acc
103    case Some{tok}:
104      tok <> acc

Uses (3)

Used by (1)