Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas committed Jan 17, 2024
1 parent 5916da2 commit 76c67dd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion crates/parser/src/grammar/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ 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() {
// let foo = macro_rules!();
// }

// test_err macro_rules_as_macro_name
// macro_rules! {};
// macro_rules! ()
// macro_rules! []
if paths::is_use_path_start(p)
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
macro_rules! {};
macro_rules! ()
macro_rules! []
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
macro_rules! {}
macro_rules! {};
macro_rules! ();
macro_rules! [];
fn main() {
Expand Down

0 comments on commit 76c67dd

Please sign in to comment.