def mentions
bolt@1.27.0.0 · src/rules/digest.bend:130
import bolt@1.27.0.0/src/rules/digest.bend as Digest
import Base
import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import bolt@1.27.0.0/src/lazy/lazy.bend as Lazy
130
131
132def mentions(us: List<&2, Bind.Use>, +ss: List<&2, Span>, +as: List<&2, Alias>, +file: String) -> List<&2, Mention>:
133 match us:
134 case Nil{}:
135 Nil{}
136 case Con{Bind.Use{n, +l, c, tt}, rest}:
137 +more = mentions(rest, ss, as, file)
138 +out = Bool.not(within(ss, l))
139 Lazy.stop(List<&2, Mention>, out, more, _u => target(tt, as, file, more))