~/bend-docscommunity

fmt/ylex.bend checks

raw source on the hub · import cswap-bend-cli@0.1.0.0/fmt/ylex.bend as Ylex

2 imports
import Base
import ../json.bend as Json

Types

type NS source · line 25 · raw

Data

Definitions

def JR source · line 8 · raw

Type

def ge source · line 11 · raw

@+c:U32 -> @lo:U32 -> Bool

def between source · line 14 · raw

@+c:U32 -> @lo:U32 -> @hi:U32 -> Bool

def is_digit source · line 17 · raw

@+c:U32 -> Bool

def is_space source · line 20 · raw

@+c:U32 -> Bool

def ns.lead source · line 37 · raw

@+c:U32 -> NS

def ns.start source · line 40 · raw

@+c:U32 -> NS

def ns.tail source · line 43 · raw

@+c:U32 -> NS

def ns.int source · line 46 · raw

@+c:U32 -> NS

def ns.frac source · line 49 · raw

@+c:U32 -> NS

def ns.exp source · line 52 · raw

@+c:U32 -> NS

def ns.digits source · line 55 · raw

@+c:U32 -> @next:NS -> NS

def ns.step source · line 58 · raw

@s:NS -> @+c:U32 -> NS

def ns.run source · line 81 · raw

@s:String -> @st:NS -> NS

def ns.accept source · line 88 · raw

@s:NS -> Bool

def is_number source · line 102 · raw

@s:String -> Bool

Is the whole text a JSON number?

def word_is source · line 107 · raw

@+low:String -> @w:String -> Bool

def is_null_word source · line 110 · raw

@+low:String -> Bool

def is_bool_word source · line 113 · raw

@+low:String -> Bool

def reserved source · line 117 · raw

@+low:String -> Bool

Words YAML 1.1 and 1.2 readers turn into another type.

def resolve.low source · line 121 · raw

@+low:String -> @+s:String -> 0x0717344745a30ebad1f19045228e8f18/json.Json

A plain word as the value it stands for.

def resolve source · line 127 · raw

@+s:String -> 0x0717344745a30ebad1f19045228e8f18/json.Json

def bad_first source · line 134 · raw

@+c:U32 -> Bool

Characters a plain scalar must not start with: indicators, quotes, and anything a reader could take for a number, a date, a tag or a merge key.

def bad_char source · line 140 · raw

@+c:U32 -> Bool

def rest_ok source · line 144 · raw

@s:String -> @+prev:U32 -> Bool

Scan the rest: no control characters, no ": " or trailing ":", no " #".

def first_ok source · line 151 · raw

@s:String -> Bool

def plain_ok source · line 158 · raw

@+s:String -> Bool

def dq.pick source · line 163 · raw

@done:Bool -> @n:Nat -> @rest:Maybe<&2, Nat> -> Maybe<&2, Nat>

def dq.end source · line 172 · raw

@s:String -> @+n:Nat -> @+esc:Bool -> Maybe<&2, Nat>

n characters of a double-quoted body (after the opening quote) up to and including its closing quote, or None when it never closes.

def sq.eos source · line 179 · raw

@prevq:Bool -> @n:Nat -> Maybe<&2, Nat>

def sq.pick source · line 186 · raw

@done:Bool -> @n:Nat -> @rest:Maybe<&2, Nat> -> Maybe<&2, Nat>

def sq.end source · line 195 · raw

@s:String -> @+n:Nat -> @+prevq:Bool -> Maybe<&2, Nat>

The same for a single-quoted body: '' is a quote. prevq: the last character was a quote that may close the string.

def first_code source · line 202 · raw

@s:String -> U32

def tl.plus source · line 209 · raw

@m:Maybe<&2, Nat> -> Maybe<&2, Nat>

def tl.pick source · line 216 · raw

@isd:Bool -> @iss:Bool -> @d:Maybe<&2, Nat> -> @s:Maybe<&2, Nat> -> Maybe<&2, Nat>

def token_len.q source · line 225 · raw

@+s:String -> @+c:U32 -> Maybe<&2, Nat>

def token_len source · line 230 · raw

@+s:String -> Maybe<&2, Nat>

Length of the quoted token at the start of s (quotes included), when s starts with a quote and the token closes.