def covers

bolt@1.27.0.0 · src/syntax/bind.bend:901

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

901# does the name at (l, c) cover the position (line, col)?
902def covers(+l2: U32, +c2: U32, +name: String, +line: U32, +col: U32) -> Bool:
903  +end = (c2 + U32.from_nat(String.length(name)) : U32)
904  Bool.and(U32.is_eq(l2, line), Bool.and(U32.is_le(c2, col), U32.is_lt(col, end)))

Uses (10)

Used by (2)