Add ShapeSource to basic-shape values

This commit is contained in:
Manish Goregaokar 2016-08-15 15:04:29 +05:30
parent fc7053e030
commit 254900bd1a
No known key found for this signature in database
GPG key ID: 3BBF4D3E2EF79F98
3 changed files with 219 additions and 3 deletions

View file

@ -81,3 +81,11 @@ impl<'a> ParserContext<'a> {
pub fn log_css_error(input: &mut Parser, position: SourcePosition, message: &str, parsercontext: &ParserContext) {
parsercontext.error_reporter.report_error(input, position, message);
}
// 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;
}