mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use the ParserContext along with Parser in the parse function
This commit is contained in:
parent
c4f87f451f
commit
dee1a65a69
30 changed files with 318 additions and 285 deletions
|
@ -69,8 +69,6 @@ pub fn log_css_error(input: &mut Parser, position: SourcePosition, message: &str
|
|||
|
||||
// XXXManishearth Replace all specified value parse impls with impls of this
|
||||
// trait. This will make it easy to write more generic values in the future.
|
||||
// There may need to be two traits -- one for parsing with context, and one
|
||||
// for parsing without
|
||||
pub trait Parse {
|
||||
fn parse(input: &mut Parser) -> Result<Self, ()> where Self: Sized;
|
||||
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> where Self: Sized;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue