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
55a!();
66b![];
77c!{};
8+ d::e!();
9+ f::g::h!{};
810
911---
1012
1113(source_file
1214 (macro_invocation (identifier) (token_tree))
1315 (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)))
1519
1620============================================
1721Macro invocation - arbitrary tokens
Original file line number Diff line number Diff line change @@ -875,7 +875,10 @@ module.exports = grammar({
875875 ) ,
876876
877877 macro_invocation : $ => seq (
878- field ( 'macro' , $ . identifier ) ,
878+ field ( 'macro' , choice (
879+ $ . scoped_identifier ,
880+ $ . identifier
881+ ) ) ,
879882 '!' ,
880883 $ . token_tree
881884 ) ,
Original file line number Diff line number Diff line change 755755 },
756756 {
757757 "type" : " PATTERN" ,
758- "value" : " [/_\\ -=->,;:::!=?.@*=/='&=#%=^=+<>|~]+"
758+ "value" : " [\\ /_\\ -=->,;:::!=?.@*=\\ /='&=#%=^=+<>|~]+"
759759 },
760760 {
761761 "type" : " STRING" ,
48294829 "type" : " FIELD" ,
48304830 "name" : " macro" ,
48314831 "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+ ]
48344843 }
48354844 },
48364845 {
Original file line number Diff line number Diff line change 23052305 {
23062306 "type" : " identifier" ,
23072307 "named" : true
2308+ },
2309+ {
2310+ "type" : " scoped_identifier" ,
2311+ "named" : true
23082312 }
23092313 ]
23102314 }
You can’t perform that action at this time.
0 commit comments