pub enum Node {
Show 25 variants
Empty,
Interpreted,
Seq(&'static [u32], &'static [bool]),
Alt(&'static [u32]),
Kw(&'static str),
Kws(&'static [&'static str]),
Opt(u32),
Rep(u32, bool),
Occ(u32, u32, f64),
List(u32, u32, f64, u32),
Leaf(&'static str, u8),
Rng(u32, f64, f64, Option<&'static str>, bool),
Ref(u32),
Fn(&'static str, u32),
FnDef(&'static str, Option<u32>),
Num(f64, Option<&'static str>, Option<&'static str>),
Str(&'static str),
Comma,
Colon,
Slash,
OpenParens,
CloseParens,
OpenCurly,
OptList(u32),
Unordered(&'static [u32], &'static [bool], bool),
}Expand description
Variants§
Empty
an empty syntax
Interpreted
a definition the compiler could not compile: the interpreter validates it
Seq(&'static [u32], &'static [bool])
a sequence: the items, nullable[i]: the items from i are nullable
Alt(&'static [u32])
alternatives: the one that matches the most tokens
Kw(&'static str)
a keyword (lowercase), ignoring the case
Kws(&'static [&'static str])
alternative keywords (lowercase, sorted)
Opt(u32)
an optional syntax: skipped when it does not match
Rep(u32, bool)
* (zero allowed) or +
Occ(u32, u32, f64)
{min,max}
List(u32, u32, f64, u32)
#{min,max}, the number of commas of an item
Leaf(&'static str, u8)
a type validated by match_property(), the kind of its fast path (see leaf_kind)
Rng(u32, f64, f64, Option<&'static str>, bool)
a type with a range: the type, min, max, the unit of a dimension range, optional
Ref(u32)
a reference to a definition
Fn(&'static str, u32)
a function (lowercase name) and its arguments
FnDef(&'static str, Option<u32>)
a function definition <rgb()>: the definition of the function syntax
Num(f64, Option<&'static str>, Option<&'static str>)
a literal number or dimension: the value, the token type name of the unit, the unit
Str(&'static str)
a quoted literal: '+'
Comma
Colon
Slash
OpenParens
CloseParens
OpenCurly
OptList(u32)
<bg-layer>#? , <final-bg-layer>: [ <bg-layer> , ]*
Unordered(&'static [u32], &'static [bool], bool)
|| (any) or && (all): the operands, nullable operands