MCPcopy Create free account
hub / github.com/csskit/csskit / parse

Method parse

crates/csskit_proc_macro/src/inherited.rs:17–31  ·  view source on GitHub ↗
(input: ParseStream)

Source from the content-addressed store, hash-verified

15
16impl Parse for Args {
17 fn parse(input: ParseStream) -> Result<Self> {
18 match input.parse::<LitStr>()?.value().as_str() {
19 "yes" => Ok(Self::Yes),
20 // TODO(keithamus): drop 'invidual properties' after https://github.com/w3c/csswg-drafts/pull/11106
21 "see individual properties" | "invidual properties" => Ok(Self::SeeIndividualProperties),
22 "no" => Ok(Self::No),
23 s => {
24 dbg!(format!(
25 "WARNING:: inherited value {} not recognised. Property will need to impl StyleValue trait manually.",
26 s
27 ));
28 Ok(Self::Unknown)
29 }
30 }
31 }
32}
33
34pub fn generate(args: Args, ast: DeriveInput) -> TokenStream {

Callers

nothing calls this directly

Calls 2

as_strMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected