1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use nodes::{ Parse, Parser, Module }; use nodes::body::Body; use error::TemplateResult; impl<'c> Parse<'c> for Module<'c> { type Output = Module<'c>; fn parse<'r>(parser: &mut Parser<'r, 'c>) -> TemplateResult<Module<'c>> { trace!("Module::parse"); let mut module = Module::new(); let body = try!(Body::parse(parser)); module.body = body; Ok(module) } }