Make it possible to invoke item macros without passing identifier arguments.
This commit is contained in:
parent
cafea5ecb6
commit
fca52554e7
4 changed files with 55 additions and 33 deletions
|
@ -3534,7 +3534,11 @@ impl Parser {
|
|||
// item macro.
|
||||
let pth = self.parse_path_without_tps();
|
||||
self.expect(token::NOT);
|
||||
let id = self.parse_ident();
|
||||
let id = if self.token == token::LPAREN {
|
||||
token::special_idents::invalid // no special identifier
|
||||
} else {
|
||||
self.parse_ident()
|
||||
};
|
||||
let tts = match self.token {
|
||||
token::LPAREN | token::LBRACE => {
|
||||
let ket = token::flip_delimiter(copy self.token);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue