def refresh.go
bolt@1.27.0.0 · src/syntax/bind.bend:1026
import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import Base
1026
1027
1028
1029
1030
1031
1032def refresh.go(
1033 env: List<&2, Bind>,
1034 +binds: List<&2, Bind>,
1035 +cur: List<&2, Bind>,
1036 +tl: U32,
1037 +tc: U32,
1038 acc: List<&2, Bind>
1039) -> List<&2, Bind>:
1040 match env:
1041 case Nil{}:
1042 acc
1043 case Con{Bind{name, +l, +c, kind, note}, rest}:
1044 +start = Bool.pick(List<&2, Bind>, before(l, c, tl, tc), binds, cur)
1045 +from = seek(start, l, c, seek.stop(start, l, c))
1046 refresh.go(rest, binds, from, l, c, noted(seek.head(from, l, c), Bind{name, l, c, kind, note}) <> acc)