def points.skip

bolt@1.27.0.0 · src/lsp/enc.bend:84

import bolt@1.27.0.0/src/lsp/enc.bend as Enc
import Base

84# the units left after a char, from 1+p units: p after a narrow one, one
85# fewer after a wide one (none when the offset falls inside its pair)
86def points.skip(isw: Bool, pp: Nat) -> Nat:
87  match isw pp:
88    case True{} 0n:
89      0n
90    case True{} 1n+q:
91      q
92    case False{} _:
93      pp

Uses (2)

Used by (1)