def behind_bind

bolt@1.27.0.0 · src/lsp/semantic.bend:101

import bolt@1.27.0.0/src/lsp/semantic.bend as Semantic
import Base
import bolt@1.27.0.0/src/syntax/bind.bend as Bind

101# a list's head is behind the token: it was never matched (a name the lexer
102# and the binder disagree on); it is dropped so the rest can line up again
103def behind_bind(binds: List<&2, Bind.Bind>, +line: U32, +col: U32) -> Bool:
104  match binds:
105    case Nil{}:
106      False{}
107    case Con{Bind.Bind{n, +l, c, k, note}, rest}:
108      Bool.or(U32.is_lt(l, line), Bool.and(U32.is_eq(l, line), U32.is_lt(c, col)))

Uses (8)

Used by (1)