def at.skip

bolt@1.27.0.0 · src/syntax/word.bend:81

import bolt@1.27.0.0/src/syntax/word.bend as Word
import Base

81# the source with `n` lines skipped. `done` means this string is the line
82def at.skip(ss: String, +nn: U32, done: Bool) -> String:
83  match ss done:
84    case SNil{} _:
85      SNil{}
86    case SCon{h, t} True{}:
87      SCon{h, t}
88    case SCon{+h, t} False{}:
89      at.skip(t, at.skip.n(Char.is_eq(h, '\n'), nn), at.skip.done(Char.is_eq(h, '\n'), nn))

Uses (7)

Used by (1)