def ctors

bolt@1.27.0.0 · src/syntax/bind.bend:140

import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import Base
import bolt@1.27.0.0/src/syntax/tree.bend as Tree

140# a type's constructors: the first name of each line under it
141def ctors(body: Tree.Node, acc: List<&2, String>) -> List<&2, String>:
142  match body:
143    case Tree.NCons{Tree.Stmt{k, kids, b}, rest}:
144      ctors(rest, push_name(declared.go(kids), acc))
145    case other:
146      acc

Uses (5)

Used by (1)