Epic refactor of doom, the third
This commit is contained in:
parent
9b13557781
commit
bc305caf17
2 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
#![crate_type = "dylib"]
|
#![crate_type = "dylib"]
|
||||||
#![feature(plugin_registrar, quote)]
|
#![feature(plugin_registrar, quote)]
|
||||||
#![feature(collections, core, rustc_private)]
|
#![feature(collections, rustc_private)]
|
||||||
|
|
||||||
extern crate syntax;
|
extern crate syntax;
|
||||||
extern crate rustc;
|
extern crate rustc;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
use std::mem;
|
||||||
use syntax::ast::{Expr, ExprParen, Lit, Stmt, TokenTree, TtDelimited, TtToken};
|
use syntax::ast::{Expr, ExprParen, Lit, Stmt, TokenTree, TtDelimited, TtToken};
|
||||||
use syntax::codemap::Span;
|
use syntax::codemap::Span;
|
||||||
use syntax::ext::base::ExtCtxt;
|
use syntax::ext::base::ExtCtxt;
|
||||||
|
@ -193,10 +194,10 @@ impl<'cx, 's, 'i> Parser<'cx, 's, 'i> {
|
||||||
self.render.attribute_start(name.as_str());
|
self.render.attribute_start(name.as_str());
|
||||||
{
|
{
|
||||||
// Parse a value under an attribute context
|
// Parse a value under an attribute context
|
||||||
let old_in_attr = self.in_attr;
|
let in_attr = true;
|
||||||
self.in_attr = true;
|
mem::swap(&mut self.in_attr, &mut in_attr);
|
||||||
self.markup();
|
self.markup();
|
||||||
self.in_attr = old_in_attr;
|
mem::swap(&mut self.in_attr, &mut in_attr);
|
||||||
}
|
}
|
||||||
self.render.attribute_end();
|
self.render.attribute_end();
|
||||||
},
|
},
|
||||||
|
@ -229,7 +230,7 @@ impl<'cx, 's, 'i> Parser<'cx, 's, 'i> {
|
||||||
in_attr: self.in_attr,
|
in_attr: self.in_attr,
|
||||||
input: tts,
|
input: tts,
|
||||||
span: sp,
|
span: sp,
|
||||||
render: Renderer::new(self.render.cx),
|
render: self.render.fork(),
|
||||||
};
|
};
|
||||||
parse.markups();
|
parse.markups();
|
||||||
parse.into_render().into_stmts()
|
parse.into_render().into_stmts()
|
||||||
|
|
Loading…
Add table
Reference in a new issue