json/scan.bend checks
raw source on the hub · import cswap-bend-cli@0.1.0.0/json/scan.bend as Scan
2 imports
import Base import ./lex.bend as Lex
Definitions
def tk.kind source · line 4 · raw
@t:0x0717344745a30ebad1f19045228e8f18/json/lex.Tok -> U32
def depth.next source · line 19 · raw
@+k:U32 -> @+d:U32 -> U32
def stopper source · line 23 · raw
@+k:U32 -> @+d:U32 -> Bool
def scan.pick source · line 26 · raw
@stop:Bool -> @rest:Nat -> Nat
def scan source · line 34 · raw
@toks:List<&2, 0x0717344745a30ebad1f19045228e8f18/json/lex.Tok> -> @+d:U32 -> Nat
Tokens before the first comma or closer at depth 0.
def last.kind source · line 41 · raw
@m:Maybe<&2, 0x0717344745a30ebad1f19045228e8f18/json/lex.Tok> -> U32
def closed_by source · line 49 · raw
@+t:List<&2, 0x0717344745a30ebad1f19045228e8f18/json/lex.Tok> -> @k:U32 -> Bool
Is the last token of t the closer k?
def err.of source · line 52 · raw
@toks:List<&2, 0x0717344745a30ebad1f19045228e8f18/json/lex.Tok> -> String