Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPort to the new cssparser. #4689
Conversation
This comment has been minimized.
This comment has been minimized.
hoppipolla-critic-bot
commented
Jan 20, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/3796 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
This comment has been minimized.
This comment has been minimized.
|
@larsbergstrom How would you like to split this up? |
This comment has been minimized.
This comment has been minimized.
|
@pcwalton I was just going to review it since you are on PTO today and am happy to either let you review it or divide it up however you would like. |
This comment has been minimized.
This comment has been minimized.
|
I just realized I forgot to write any docs. Sorry! I’ll write more down tomorrow. In the meantime, the main important point is the convention for parsing functions:
As a consequence, when calling another parsing function, either:
Examples: // 'none' | <image>
fn parse_background_image(context: &ParserContext, input: &mut Parser)
-> Result<Option<Image>, ()> {
if input.try(|input| input.expect_ident_matching("none")).is_ok() {
Ok(None)
} else {
Image::parse(context, input).map(Some) // tail call
}
}// [ <length> | <percentage> ] [ <length> | <percentage> ]?
fn parse_border_spacing(_context: &ParserContext, input: &mut Parser)
-> Result<(LengthOrPercentage, LengthOrPercentage), ()> {
let first = try!(LengthOrPercentage::parse);
let second = input.try(LengthOrPercentage::parse).unwrap_or(first);
(first, second)
} |
SimonSapin
force-pushed the
newnewnewcss
branch
from
2c9567f
to
d034a6c
Jan 21, 2015
This comment has been minimized.
This comment has been minimized.
|
r=larsbergstrom |
This comment has been minimized.
This comment has been minimized.
|
saw approval from larsbergstrom |
This comment has been minimized.
This comment has been minimized.
|
merging servo/servo/newnewnewcss = d034a6c into auto |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
all tests pass: |
This comment has been minimized.
This comment has been minimized.
|
fast-forwarding master to auto = 59bca29 |
This comment has been minimized.
This comment has been minimized.
|
r=larsbergstrom |
This comment has been minimized.
This comment has been minimized.
|
saw approval from larsbergstrom |
This comment has been minimized.
This comment has been minimized.
|
merging servo/servo/newnewnewcss = d034a6c into auto |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
all tests pass: |
This comment has been minimized.
This comment has been minimized.
|
fast-forwarding master to auto = 59bca29 |
SimonSapin commentedJan 20, 2015
servo/rust-cssparser#68
r? @larsbergstrom