pub struct ParserOptions {
pub template_placeholder: Option<TemplatePlaceholder>,
}Expand description
Parser options for customizing parser behaviors.
Fields§
§template_placeholder: Option<TemplatePlaceholder>If set, a backtick-delimited token of the shape `<prefix><decimal index>`
(see TemplatePlaceholder) is tokenized as an atomic
Token::Placeholder carrying the parsed index.
The token terminates at the closing backtick, so an immediately following
identifier (e.g. `PLACEHOLDER-0`px) is lexed as a separate suffix.
This is designed for downstream formatters that substitute template
interpolations (e.g. CSS-in-JS ${expr}) with such placeholders
before parsing, then re-substitute them in the output.
Backtick is not valid CSS/SCSS/Sass syntax, so this MUST be used with
Syntax::Scss (the parser builder asserts this); in Less, backtick is
the inline-JS delimiter and would conflict.
Not serialized: the affix is a &'static str supplied programmatically,
not loadable from a config file.
Trait Implementations§
Source§impl Clone for ParserOptions
impl Clone for ParserOptions
Source§fn clone(&self) -> ParserOptions
fn clone(&self) -> ParserOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more