Use correct span while parsing a block
This commit is contained in:
parent
52bd1e4189
commit
56a7728fa1
1 changed files with 4 additions and 4 deletions
|
@ -107,9 +107,9 @@ impl<'cx, 's, 'i, 'r> Parser<'cx, 's, 'i, 'r> {
|
|||
self.element(name.as_str(), sp)
|
||||
},
|
||||
// Block
|
||||
[TtDelimited(_, ref d), ..] if d.delim == token::DelimToken::Brace => {
|
||||
[TtDelimited(sp, ref d), ..] if d.delim == token::DelimToken::Brace => {
|
||||
self.shift(1);
|
||||
self.block(&d.tts)
|
||||
self.block(sp, &d.tts)
|
||||
},
|
||||
// ???
|
||||
_ => {
|
||||
|
@ -210,11 +210,11 @@ impl<'cx, 's, 'i, 'r> Parser<'cx, 's, 'i, 'r> {
|
|||
}}
|
||||
}
|
||||
|
||||
fn block(&mut self, tts: &[TokenTree]) {
|
||||
fn block(&mut self, sp: Span, tts: &[TokenTree]) {
|
||||
Parser {
|
||||
in_attr: self.in_attr,
|
||||
input: tts,
|
||||
span: self.span,
|
||||
span: sp,
|
||||
render: self.render,
|
||||
}.markups();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue