def binds_in

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

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

277# a `=` or `<-` among a statement's own tokens
278def binds_in(kids: Node) -> Bool:
279  match kids:
280    case NCons{Leaf{Lex.Tok{Lex.TEq{}, t, l, c}}, rest}:
281      True{}
282    case NCons{Leaf{Lex.Tok{Lex.TBind{}, t, l, c}}, rest}:
283      True{}
284    case NCons{h, rest}:
285      binds_in(rest)
286    case other:
287      False{}

Uses (4)

Used by (1)