Skip to main content

Module input

Module input 

Source
Expand description

Port of src/parser/input.ts.

css input: utf-8 bytes (the preferred input: the bindings pass the bytes of an ArrayBuffer) or a string. ascii input is read from its bytes without copy: the same shared buffer is the text and the code units.

Structs§

CssCodeUnits
the css read by the tokenizer: the code units and the text

Enums§

CssInput
css input

Functions§

is_empty_input
true if the input is empty
rc_bytes_to_str
view shared ascii / utf-8 bytes as a string without copy
rc_str_to_bytes
view a shared string as bytes without copy
to_code_units
convert the css input to code units. an ascii input is read from its bytes: the code units are the bytes. the other inputs are decoded (utf-8, without byte order mark) to utf-16 code units: the positions of the tokens are utf-16 positions, like the positions in a javascript string