This commit is contained in:
Johann Hemmann 2024-01-17 12:24:18 +01:00
parent 5916da2c29
commit 76c67dd229
5 changed files with 18 additions and 16 deletions

View file

@ -60,7 +60,6 @@ pub(super) fn item_or_macro(p: &mut Parser<'_>, stop_on_r_curly: bool) {
// test macro_rules_as_macro_name
// macro_rules! {}
// macro_rules! {};
// macro_rules! ();
// macro_rules! [];
// fn main() {
@ -68,6 +67,7 @@ pub(super) fn item_or_macro(p: &mut Parser<'_>, stop_on_r_curly: bool) {
// }
// test_err macro_rules_as_macro_name
// macro_rules! {};
// macro_rules! ()
// macro_rules! []
if paths::is_use_path_start(p)

View file

@ -1,4 +1,17 @@
SOURCE_FILE
MACRO_CALL
PATH
PATH_SEGMENT
NAME_REF
IDENT "macro_rules"
BANG "!"
WHITESPACE " "
TOKEN_TREE
L_CURLY "{"
R_CURLY "}"
ERROR
SEMICOLON ";"
WHITESPACE "\n"
MACRO_CALL
PATH
PATH_SEGMENT
@ -21,5 +34,6 @@ SOURCE_FILE
L_BRACK "["
R_BRACK "]"
WHITESPACE "\n"
error 15: expected SEMICOLON
error 31: expected SEMICOLON
error 15: expected an item
error 32: expected SEMICOLON
error 48: expected SEMICOLON

View file

@ -1,2 +1,3 @@
macro_rules! {};
macro_rules! ()
macro_rules! []

View file

@ -10,18 +10,6 @@ SOURCE_FILE
L_CURLY "{"
R_CURLY "}"
WHITESPACE "\n"
MACRO_CALL
PATH
PATH_SEGMENT
NAME_REF
IDENT "macro_rules"
BANG "!"
WHITESPACE " "
TOKEN_TREE
L_CURLY "{"
R_CURLY "}"
SEMICOLON ";"
WHITESPACE "\n"
MACRO_CALL
PATH
PATH_SEGMENT

View file

@ -1,5 +1,4 @@
macro_rules! {}
macro_rules! {};
macro_rules! ();
macro_rules! [];
fn main() {