Crate read_token [] [src]

A simple library to read tokens using look ahead

Structs

NumberSettings

The settings for reading numbers.

Enums

ParseNumberError

Error when parsing number.

ParseStringError

Contains errors when parsing a string.

Functions

number

Reads number.

parse_number

Parses number.

parse_string

Parses string into a real string according to the JSON standard.

parse_unicode

Parses four unicode characters in hexadecimal format.

string

Reads string with character escapes.

token

Reads an expected token, return None if it does not match.

until_any

Reads token until any character in string. Returns (range, None) if stopping at end of characters. Returns (range, Some(x)) if stopping at a character.

until_any_or_whitespace

Reads a token until any character in string or whitespace. Returns (range, None) if stopping at whitespace or end of characters. Returns (range, Some(x)) if stopping at a character.

whitespace

Reads whitespace.