Skip to main content

Module parse

Module parse 

Source
Expand description

Port of src/validation/parser/parse.ts: tokenize, parse and render css value definition syntaxes (webref).

The typescript parser mutates token objects that are referenced by both the token list and the stack (Object.assign(token, ...), tokens.lastIndexOf(stack.at(-1))). The port builds the tokens in a vector: a token is identified by its index, then the result is frozen into shared ValidationTokens.

Structs§

RenderSyntaxOptions
render options of render_syntax

Functions§

parse_syntax
parse a css value definition syntax (webref)
render_syntax
render a validation token
tokenize_syntax
tokenize a syntax definition
trim_syntax_array
trim whitespace tokens, and the whitespace around commas