mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Move some parsing-only attributes to use #[parse(..)] instead of #[css(..)].
I need to admit I'm ambivalent about this one :). Bug: 1466609 Reviewed-by: xidorn MozReview-Commit-ID: F1jlfnQKXwo
This commit is contained in:
parent
8821ad72f4
commit
2c0a19e517
8 changed files with 39 additions and 29 deletions
|
@ -157,12 +157,12 @@ impl<'a> ParserContext<'a> {
|
|||
///
|
||||
/// The derive code understands the following attributes on each of the variants:
|
||||
///
|
||||
/// * `#[css(aliases = "foo,bar")]` can be used to alias a value with another
|
||||
/// * `#[parse(aliases = "foo,bar")]` can be used to alias a value with another
|
||||
/// at parse-time.
|
||||
///
|
||||
/// * `#[css(parse_condition = "function")]` can be used to make the parsing of
|
||||
/// the value conditional on `function`, which will be invoked with a
|
||||
/// `&ParserContext` reference.
|
||||
/// * `#[parse(condition = "function")]` can be used to make the parsing of the
|
||||
/// value conditional on `function`, which needs to fulfill
|
||||
/// `fn(&ParserContext) -> bool`.
|
||||
pub trait Parse: Sized {
|
||||
/// Parse a value of this type.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue