Length-indexed parser input.
@[reducible, inline]
abbrev
Input.advance
{σ τ : Type}
[Buffer σ]
{n : ℕ}
[Reader σ τ]
(inp : Input σ n)
(t : τ)
:
Input σ (n - Reader.width σ t)
Move past one token.
Equations
- inp.advance t = inp.dropTo (n - Reader.width σ t) ⋯
Instances For
The result of foldDigits.
Instances For
Parse a sequence of ASCII digits as a decimal value.
Equations
- inp.foldDigits = Input.foldDigits.go inp 0
Instances For
Equations
- Input.ofByteArray b = { buf := b, valid := ⋯ }
Instances For
@[specialize #[]]
Collect characters while f holds, returning them as a String.
Equations
- Input.takeWhile f inp = Input.takeWhile.go f inp ""