mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
style: Have OneOrMoreSeparated replace OneOrMoreCommaSeparated.
A future patch series has some values that should be separated by spaces. This allows us to re-use the code for serialization, but the types do get a little clunky. The separator is now indicated with an associated type.
This commit is contained in:
parent
e41b7d06b4
commit
26179b3660
6 changed files with 64 additions and 14 deletions
|
@ -19,7 +19,7 @@ use std::ascii::AsciiExt;
|
|||
use std::borrow::Cow;
|
||||
use std::fmt;
|
||||
use std::ops::Range;
|
||||
use style_traits::{ToCss, OneOrMoreCommaSeparated, ParseError, StyleParseError};
|
||||
use style_traits::{ToCss, OneOrMoreSeparated, CommaSeparator, ParseError, StyleParseError};
|
||||
use values::CustomIdent;
|
||||
|
||||
/// Parse the prelude of an @counter-style rule
|
||||
|
@ -552,7 +552,9 @@ pub struct AdditiveTuple {
|
|||
pub symbol: Symbol,
|
||||
}
|
||||
|
||||
impl OneOrMoreCommaSeparated for AdditiveTuple {}
|
||||
impl OneOrMoreSeparated for AdditiveTuple {
|
||||
type S = CommaSeparator;
|
||||
}
|
||||
|
||||
impl Parse for AdditiveTuple {
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue