-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)A-grammarArea: The grammar of RustArea: The grammar of RustA-syntaxextArea: Syntax extensionsArea: Syntax extensionsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
Judging from the tutorial it seems that macro fragment matching is done with names coming directly from the grammar. It doesn't seem wise to tie names in user code to the entire grammar that a particular snapshot of a particular rust compiler uses internally. Perhaps it would be better to figure out a subset of non-terminals that are sensible to use in macros and that compilers are free to map however they like internally.
This would also make it easy to provide user-facing names that aren't as aggressively abbreviated as the internal names, e.g. type(?) instead of ty.
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)A-grammarArea: The grammar of RustArea: The grammar of RustA-syntaxextArea: Syntax extensionsArea: Syntax extensionsC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.