Skip to main content

Module tokenize

Module tokenize 

Source
Expand description

Port of src/parser/tokenize.ts.

The tokenizer reads the code units of the css source (ascii bytes or utf-16 code units, see crate::parser::input): the values of the tokens are ranges of the code units, no string is created.

Structs§

ParseInfo
the css being tokenized (ParseInfo)
Tokenizer
tokenizer

Enums§

StreamChunk
a chunk of a stream
TokenValueField
field of the token the value of a token is stored in
TokenValueKind
where the string value of a token is read from

Functions§

create_parse_info
the parse info of a css input
decode_escapes
decode the escape sequences of a range of code units: a backslash followed by a new line, or by 1 to 6 hexadecimal digits, and an optional space
is_hint
do not capture the value (hintsEnum)
parse_number
value of a number: the longest prefix of the range that is a number, like parseFloat(). the prefix is copied to a stack buffer and parsed by the correctly rounded rust parser (same result as parseFloat())