Parse.kind.index: def of yaml-for-bend@0.1.1.0 Import: import yaml-for-bend@0.1.1.0/parse.bend as Parse Lines 190-236 of yaml-for-bend@0.1.1.0/parse.bend: https://jend.leeeet.dev/read.txt?path=yaml-for-bend@0.1.1.0/parse.bend&start_line=190&end_line=236 import Base import yaml-for-bend@0.1.1.0/token.bend as T # A token's kind as a number, to test it against a few. def kind.index(t: T.Tok) -> Nat: match t: case T.StreamStart{}: 0n case T.StreamEnd{}: 1n case T.VersionDir{a, b}: 2n case T.TagDir{h, p}: 3n case T.DocStart{}: 4n case T.DocEnd{}: 5n case T.BSeqStart{}: 6n case T.BMapStart{}: 7n case T.BEnd{}: 8n case T.FSeqStart{}: 9n case T.FSeqEnd{}: 10n case T.FMapStart{}: 11n case T.FMapEnd{}: 12n case T.BEntry{}: 13n case T.FEntry{}: 14n case T.KeyTok{}: 15n case T.ValueTok{}: 16n case T.AliasTok{n}: 17n case T.AnchorTok{n}: 18n case T.TagTok{h, s}: 19n case T.ScalarTok{t, s}: 20n case T.Broken{e}: 21n Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=yaml-for-bend@0.1.1.0/token.bend&name=Tok