def has_eq
import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalkimport Base
import bolt@1.27.0.0/src/syntax/lex.bend as Lex
import bolt@1.27.0.0/src/syntax/tree.bend as Tree
281# does the chain bind?
282def has_eq(nn: Tree.Node) -> Bool:
283 match nn:
284 case Tree.NCons{Tree.Leaf{Lex.Tok{Lex.TEq{}, t, l, c}}, rest}:
285 True{}
286 case Tree.NCons{h, rest}:
287 has_eq(rest)
288 case other:
289 False{}