def item_sites.binds
bolt@1.27.0.0 · src/syntax/bind.bend:1074
import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import Base
1074
1075
1076def item_sites.binds(binds: List<&2, Bind>, +name: String) -> List<&2, Pos>:
1077 match binds:
1078 case Nil{}:
1079 Nil{}
1080 case Con{Bind{+n, l, c, KItem{}, note}, rest}:
1081 +more = item_sites.binds(rest, name)
1082 Bool.pick(List<&2, Pos>, String.eq(n, name), Pos{l, c} <> more, more)
1083 case Con{Bind{+n, l, c, KCtor{}, note}, rest}:
1084 +more = item_sites.binds(rest, name)
1085 Bool.pick(List<&2, Pos>, String.eq(n, name), Pos{l, c} <> more, more)
1086 case Con{other, rest}:
1087 item_sites.binds(rest, name)