Liberalize attributes.
This commit is contained in:
parent
68c1cc68b4
commit
839c2860cc
17 changed files with 257 additions and 172 deletions
|
@ -2644,6 +2644,17 @@ impl<'a> Parser<'a> {
|
|||
Ok(tts)
|
||||
}
|
||||
|
||||
pub fn parse_tokens(&mut self) -> TokenStream {
|
||||
let mut result = Vec::new();
|
||||
loop {
|
||||
match self.token {
|
||||
token::Eof | token::CloseDelim(..) => break,
|
||||
_ => result.push(self.parse_token_tree().into()),
|
||||
}
|
||||
}
|
||||
TokenStream::concat(result)
|
||||
}
|
||||
|
||||
/// Parse a prefix-unary-operator expr
|
||||
pub fn parse_prefix_expr(&mut self,
|
||||
already_parsed_attrs: Option<ThinVec<Attribute>>)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue