Cleanup
This commit is contained in:
parent
333eb46c3a
commit
92020cfa86
1 changed files with 14 additions and 16 deletions
|
@ -236,22 +236,20 @@ impl<'cx, 's, 'i> Parser<'cx, 's, 'i> {
|
||||||
self.shift(1);
|
self.shift(1);
|
||||||
tts.push(tt.clone());
|
tts.push(tt.clone());
|
||||||
}
|
}
|
||||||
loop {
|
loop { match self.input {
|
||||||
match self.input {
|
// Munch attribute lookups e.g. `$person.address.street`
|
||||||
// Munch attribute lookups e.g. `$person.address.street`
|
[ref dot @ dot!(), ref ident @ ident!(_), ..] => {
|
||||||
[ref dot @ dot!(), ref ident @ ident!(_), ..] => {
|
self.shift(2);
|
||||||
self.shift(2);
|
tts.push(dot.clone());
|
||||||
tts.push(dot.clone());
|
tts.push(ident.clone());
|
||||||
tts.push(ident.clone());
|
},
|
||||||
},
|
// Munch function calls `()` and indexing operations `[]`
|
||||||
// Munch function calls `()` and indexing operations `[]`
|
[TtDelimited(sp, ref d), ..] if d.delim != token::DelimToken::Brace => {
|
||||||
[TtDelimited(sp, ref d), ..] if d.delim != token::DelimToken::Brace => {
|
self.shift(1);
|
||||||
self.shift(1);
|
tts.push(TtDelimited(sp, d.clone()));
|
||||||
tts.push(TtDelimited(sp, d.clone()));
|
},
|
||||||
},
|
_ => break,
|
||||||
_ => break,
|
}}
|
||||||
}
|
|
||||||
}
|
|
||||||
if tts.is_empty() {
|
if tts.is_empty() {
|
||||||
self.render.cx.span_fatal(sp, "expected expression for this splice");
|
self.render.cx.span_fatal(sp, "expected expression for this splice");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue