File tree Expand file tree Collapse file tree 5 files changed +70305
-65612
lines changed Expand file tree Collapse file tree 5 files changed +70305
-65612
lines changed Original file line number Diff line number Diff line change @@ -5,13 +5,17 @@ Macro invocation - no arguments
5
5
a!();
6
6
b![];
7
7
c!{};
8
+ d::e!();
9
+ f::g::h!{};
8
10
9
11
---
10
12
11
13
(source_file
12
14
(macro_invocation (identifier) (token_tree))
13
15
(macro_invocation (identifier) (token_tree))
14
- (macro_invocation (identifier) (token_tree)))
16
+ (macro_invocation (identifier) (token_tree))
17
+ (macro_invocation (scoped_identifier (identifier) (identifier)) (token_tree))
18
+ (macro_invocation (scoped_identifier (scoped_identifier (identifier) (identifier)) (identifier)) (token_tree)))
15
19
16
20
============================================
17
21
Macro invocation - arbitrary tokens
Original file line number Diff line number Diff line change @@ -875,7 +875,10 @@ module.exports = grammar({
875
875
) ,
876
876
877
877
macro_invocation : $ => seq (
878
- field ( 'macro' , $ . identifier ) ,
878
+ field ( 'macro' , choice (
879
+ $ . scoped_identifier ,
880
+ $ . identifier
881
+ ) ) ,
879
882
'!' ,
880
883
$ . token_tree
881
884
) ,
Original file line number Diff line number Diff line change 755
755
},
756
756
{
757
757
"type" : " PATTERN" ,
758
- "value" : " [/_\\ -=->,;:::!=?.@*=/='&=#%=^=+<>|~]+"
758
+ "value" : " [\\ /_\\ -=->,;:::!=?.@*=\\ /='&=#%=^=+<>|~]+"
759
759
},
760
760
{
761
761
"type" : " STRING" ,
4829
4829
"type" : " FIELD" ,
4830
4830
"name" : " macro" ,
4831
4831
"content" : {
4832
- "type" : " SYMBOL" ,
4833
- "name" : " identifier"
4832
+ "type" : " CHOICE" ,
4833
+ "members" : [
4834
+ {
4835
+ "type" : " SYMBOL" ,
4836
+ "name" : " scoped_identifier"
4837
+ },
4838
+ {
4839
+ "type" : " SYMBOL" ,
4840
+ "name" : " identifier"
4841
+ }
4842
+ ]
4834
4843
}
4835
4844
},
4836
4845
{
Original file line number Diff line number Diff line change 2305
2305
{
2306
2306
"type" : " identifier" ,
2307
2307
"named" : true
2308
+ },
2309
+ {
2310
+ "type" : " scoped_identifier" ,
2311
+ "named" : true
2308
2312
}
2309
2313
]
2310
2314
}
You can’t perform that action at this time.
0 commit comments