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);
|
||||
tts.push(tt.clone());
|
||||
}
|
||||
loop {
|
||||
match self.input {
|
||||
// Munch attribute lookups e.g. `$person.address.street`
|
||||
[ref dot @ dot!(), ref ident @ ident!(_), ..] => {
|
||||
self.shift(2);
|
||||
tts.push(dot.clone());
|
||||
tts.push(ident.clone());
|
||||
},
|
||||
// Munch function calls `()` and indexing operations `[]`
|
||||
[TtDelimited(sp, ref d), ..] if d.delim != token::DelimToken::Brace => {
|
||||
self.shift(1);
|
||||
tts.push(TtDelimited(sp, d.clone()));
|
||||
},
|
||||
_ => break,
|
||||
}
|
||||
}
|
||||
loop { match self.input {
|
||||
// Munch attribute lookups e.g. `$person.address.street`
|
||||
[ref dot @ dot!(), ref ident @ ident!(_), ..] => {
|
||||
self.shift(2);
|
||||
tts.push(dot.clone());
|
||||
tts.push(ident.clone());
|
||||
},
|
||||
// Munch function calls `()` and indexing operations `[]`
|
||||
[TtDelimited(sp, ref d), ..] if d.delim != token::DelimToken::Brace => {
|
||||
self.shift(1);
|
||||
tts.push(TtDelimited(sp, d.clone()));
|
||||
},
|
||||
_ => break,
|
||||
}}
|
||||
if tts.is_empty() {
|
||||
self.render.cx.span_fatal(sp, "expected expression for this splice");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue