Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Should MacroCall include optional ident? #51

Open
ehuss opened this issue Jun 28, 2019 · 2 comments
Open

Should MacroCall include optional ident? #51

ehuss opened this issue Jun 28, 2019 · 2 comments
Labels
grammar Issues with the definition of the rust grammar

Comments

@ehuss
Copy link
Contributor

ehuss commented Jun 28, 2019

The current grammar defines a macro call with an IDENT after the !, but libsyntax rejects this in various places.

foo!bar{}

If this is removed, then special support for macro_rules! would need to be added.

@ehuss ehuss added the grammar Issues with the definition of the rust grammar label Jun 28, 2019
@petrochenkov
Copy link

Support for defining foo! bar { ... } macros was removed in rust-lang/rust#61606, so the parser needs to be cleaned up too.

macro_rules hasn't been a macro call for yeas, it's treated specially by the parser as well, and it should be treated specially by the grammar.
Also, we may want to support pub on macro_rules items, which would make them more special.

@petrochenkov
Copy link

cc rust-lang/rust#62258

Centril added a commit to Centril/rust that referenced this issue Jul 1, 2019
syntax: Unsupport `foo! bar { ... }` macros in the parser

Their support in expansion was removed in rust-lang#61606.

Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).

cc rust-lang/wg-grammar#51
Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
syntax: Unsupport `foo! bar { ... }` macros in the parser

Their support in expansion was removed in rust-lang#61606.

Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).

cc rust-lang/wg-grammar#51
Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
syntax: Unsupport `foo! bar { ... }` macros in the parser

Their support in expansion was removed in rust-lang#61606.

Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).

cc rust-lang/wg-grammar#51
Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
syntax: Unsupport `foo! bar { ... }` macros in the parser

Their support in expansion was removed in rust-lang#61606.

Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).

cc rust-lang/wg-grammar#51
Centril added a commit to Centril/rust that referenced this issue Jul 3, 2019
syntax: Unsupport `foo! bar { ... }` macros in the parser

Their support in expansion was removed in rust-lang#61606.

Also un-reserve `macro_rules` as a macro name, there's no ambiguity between `macro_rules` definitions and macro calls (it also wasn't reserved correctly).

cc rust-lang/wg-grammar#51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Issues with the definition of the rust grammar
Projects
None yet
Development

No branches or pull requests

2 participants