File tree Expand file tree Collapse file tree 2 files changed +42
-3
lines changed Expand file tree Collapse file tree 2 files changed +42
-3
lines changed Original file line number Diff line number Diff line change @@ -1190,7 +1190,7 @@ module.exports = grammar({
1190
1190
) ,
1191
1191
1192
1192
match_arm : $ => prec . right ( seq (
1193
- repeat ( $ . attribute_item ) ,
1193
+ repeat ( choice ( $ . attribute_item , $ . inner_attribute_item ) ) ,
1194
1194
field ( 'pattern' , $ . match_pattern ) ,
1195
1195
'=>' ,
1196
1196
choice (
@@ -1200,7 +1200,7 @@ module.exports = grammar({
1200
1200
) ) ,
1201
1201
1202
1202
last_match_arm : $ => seq (
1203
- repeat ( $ . attribute_item ) ,
1203
+ repeat ( choice ( $ . attribute_item , $ . inner_attribute_item ) ) ,
1204
1204
field ( 'pattern' , $ . match_pattern ) ,
1205
1205
'=>' ,
1206
1206
field ( 'value' , $ . _expression ) ,
Original file line number Diff line number Diff line change @@ -1101,6 +1101,11 @@ mod macos_only {
1101
1101
#![cfg(target_os = "macos")]
1102
1102
}
1103
1103
1104
+ match ty {
1105
+ #![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
1106
+ syn::Type::Array(ty) => self.visit_type(&ty.elem),
1107
+ }
1108
+
1104
1109
--------------------------------------------------------------------------------
1105
1110
1106
1111
(source_file
@@ -1112,7 +1117,41 @@ mod macos_only {
1112
1117
(identifier)
1113
1118
arguments: (token_tree
1114
1119
(identifier)
1115
- (string_literal)))))))
1120
+ (string_literal
1121
+ (string_content)))))))
1122
+ (expression_statement
1123
+ (match_expression
1124
+ value: (identifier)
1125
+ body: (match_block
1126
+ (match_arm
1127
+ (inner_attribute_item
1128
+ (attribute
1129
+ (identifier)
1130
+ arguments: (token_tree
1131
+ (identifier)
1132
+ (token_tree
1133
+ (identifier)
1134
+ (identifier))
1135
+ (identifier)
1136
+ (token_tree
1137
+ (identifier)))))
1138
+ pattern: (match_pattern
1139
+ (tuple_struct_pattern
1140
+ type: (scoped_identifier
1141
+ path: (scoped_identifier
1142
+ path: (identifier)
1143
+ name: (identifier))
1144
+ name: (identifier))
1145
+ (identifier)))
1146
+ value: (call_expression
1147
+ function: (field_expression
1148
+ value: (self)
1149
+ field: (field_identifier))
1150
+ arguments: (arguments
1151
+ (reference_expression
1152
+ value: (field_expression
1153
+ value: (identifier)
1154
+ field: (field_identifier))))))))))
1116
1155
1117
1156
================================================================================
1118
1157
Key-Value Attribute Expressions
You can’t perform that action at this time.
0 commit comments