aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/test_data/parser/inline
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-03 15:13:15 +0100
committerGitHub <[email protected]>2020-04-03 15:13:15 +0100
commit6a2dd7bafc24ac405aebf29f04120ca071019e92 (patch)
treeac21306c7bf9dc816f4b0e9b50322f57256eddfa /crates/ra_syntax/test_data/parser/inline
parent795b8cf9c5a6f3be4117823c896f41d1a4455079 (diff)
parentda8eb29a2f70a58122903bf087bd6c1d0fbd6d3f (diff)
Merge #3836
3836: Macro patterns are not confused with expressions. r=matklad a=matklad We treat macro calls as expressions (there's appropriate Into impl), which causes problem if there's expresison and non-expression macro in the same node (like in the match arm). We fix this problem by nesting macor patterns into another node (the same way we nest path into PathExpr or PathPat). Ideally, we probably should add a similar nesting for macro expressions, but that needs some careful thinking about macros in blocks: `{ am_i_expression!() }`. bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/inline')
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt21
1 files changed, 11 insertions, 10 deletions
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt
index b05ccc0ed..36d8f4a5f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0129_marco_pat.txt
@@ -15,16 +15,17 @@ SOURCE_FILE@[0; 33)
15 LET_STMT@[16; 30) 15 LET_STMT@[16; 30)
16 LET_KW@[16; 19) "let" 16 LET_KW@[16; 19) "let"
17 WHITESPACE@[19; 20) " " 17 WHITESPACE@[19; 20) " "
18 MACRO_CALL@[20; 25) 18 MACRO_PAT@[20; 25)
19 PATH@[20; 21) 19 MACRO_CALL@[20; 25)
20 PATH_SEGMENT@[20; 21) 20 PATH@[20; 21)
21 NAME_REF@[20; 21) 21 PATH_SEGMENT@[20; 21)
22 IDENT@[20; 21) "m" 22 NAME_REF@[20; 21)
23 EXCL@[21; 22) "!" 23 IDENT@[20; 21) "m"
24 TOKEN_TREE@[22; 25) 24 EXCL@[21; 22) "!"
25 L_PAREN@[22; 23) "(" 25 TOKEN_TREE@[22; 25)
26 IDENT@[23; 24) "x" 26 L_PAREN@[22; 23) "("
27 R_PAREN@[24; 25) ")" 27 IDENT@[23; 24) "x"
28 R_PAREN@[24; 25) ")"
28 WHITESPACE@[25; 26) " " 29 WHITESPACE@[25; 26) " "
29 EQ@[26; 27) "=" 30 EQ@[26; 27) "="
30 WHITESPACE@[27; 28) " " 31 WHITESPACE@[27; 28) " "