@@ -109,18 +109,26 @@ yaml_locations(unique int locatable: @yaml_locatable ref,
109109@yaml_locatable = @yaml_node | @yaml_error;
110110
111111/*- BICEP dbscheme -*/
112+ @bicep_underscore_declaration = @bicep_assert_statement | @bicep_metadata_declaration | @bicep_module_declaration | @bicep_output_declaration | @bicep_parameter_declaration | @bicep_resource_declaration | @bicep_test_block | @bicep_type_declaration | @bicep_user_defined_function | @bicep_variable_declaration
113+
114+ @bicep_underscore_expression = @bicep_assignment_expression | @bicep_binary_expression | @bicep_lambda_expression | @bicep_ternary_expression | @bicep_unary_expression | @bicep_underscore_primary_expression
115+
116+ @bicep_underscore_primary_expression = @bicep_array | @bicep_call_expression | @bicep_for_statement | @bicep_member_expression | @bicep_object | @bicep_parenthesized_expression | @bicep_resource_expression | @bicep_string__ | @bicep_subscript_expression | @bicep_token_boolean | @bicep_token_identifier | @bicep_token_null | @bicep_token_number
117+
118+ @bicep_underscore_statement = @bicep_decorators | @bicep_import_functionality | @bicep_import_statement | @bicep_import_with_statement | @bicep_target_scope_assignment | @bicep_underscore_declaration | @bicep_using_statement
119+
112120#keyset[bicep_arguments, index]
113121bicep_arguments_child(
114122 int bicep_arguments: @bicep_arguments ref,
115123 int index: int ref,
116- unique int child: @bicep_expression ref
124+ unique int child: @bicep_underscore_expression ref
117125);
118126
119127bicep_arguments_def(
120128 unique int id: @bicep_arguments
121129);
122130
123- @bicep_array_child_type = @bicep_decorators | @bicep_expression
131+ @bicep_array_child_type = @bicep_decorators | @bicep_underscore_expression
124132
125133#keyset[bicep_array, index]
126134bicep_array_child(
@@ -141,15 +149,15 @@ bicep_array_type_def(
141149bicep_assert_statement_def(
142150 unique int id: @bicep_assert_statement,
143151 int name: @bicep_token_identifier ref,
144- int child: @bicep_expression ref
152+ int child: @bicep_underscore_expression ref
145153);
146154
147155@bicep_assignment_expression_left_type = @bicep_member_expression | @bicep_parenthesized_expression | @bicep_resource_expression | @bicep_subscript_expression | @bicep_token_identifier
148156
149157bicep_assignment_expression_def(
150158 unique int id: @bicep_assignment_expression,
151159 int left: @bicep_assignment_expression_left_type ref,
152- int right: @bicep_expression ref
160+ int right: @bicep_underscore_expression ref
153161);
154162
155163case @bicep_binary_expression.operator of
@@ -175,9 +183,9 @@ case @bicep_binary_expression.operator of
175183
176184bicep_binary_expression_def(
177185 unique int id: @bicep_binary_expression,
178- int left: @bicep_expression ref,
186+ int left: @bicep_underscore_expression ref,
179187 int operator: int ref,
180- int right: @bicep_expression ref
188+ int right: @bicep_underscore_expression ref
181189);
182190
183191bicep_call_expression_child(
@@ -188,16 +196,14 @@ bicep_call_expression_child(
188196bicep_call_expression_def(
189197 unique int id: @bicep_call_expression,
190198 int arguments: @bicep_arguments ref,
191- int function: @bicep_expression ref
199+ int function: @bicep_underscore_expression ref
192200);
193201
194202bicep_compatible_identifier_def(
195203 unique int id: @bicep_compatible_identifier,
196204 int child: @bicep_token_identifier ref
197205);
198206
199- @bicep_declaration = @bicep_assert_statement | @bicep_metadata_declaration | @bicep_module_declaration | @bicep_output_declaration | @bicep_parameter_declaration | @bicep_resource_declaration | @bicep_test_block | @bicep_type_declaration | @bicep_user_defined_function | @bicep_variable_declaration
200-
201207bicep_decorator_def(
202208 unique int id: @bicep_decorator,
203209 int child: @bicep_call_expression ref
@@ -214,8 +220,6 @@ bicep_decorators_def(
214220 unique int id: @bicep_decorators
215221);
216222
217- @bicep_expression = @bicep_assignment_expression | @bicep_binary_expression | @bicep_lambda_expression | @bicep_primary_expression | @bicep_ternary_expression | @bicep_unary_expression
218-
219223@bicep_for_loop_parameters_child_type = @bicep_token_loop_enumerator | @bicep_token_loop_variable
220224
221225#keyset[bicep_for_loop_parameters, index]
@@ -229,14 +233,14 @@ bicep_for_loop_parameters_def(
229233 unique int id: @bicep_for_loop_parameters
230234);
231235
232- @bicep_for_statement_body_type = @bicep_expression | @bicep_if_statement
236+ @bicep_for_statement_body_type = @bicep_if_statement | @bicep_underscore_expression
233237
234238bicep_for_statement_initializer(
235239 unique int bicep_for_statement: @bicep_for_statement ref,
236240 unique int initializer: @bicep_token_identifier ref
237241);
238242
239- @bicep_for_statement_child_type = @bicep_expression | @bicep_for_loop_parameters
243+ @bicep_for_statement_child_type = @bicep_for_loop_parameters | @bicep_underscore_expression
240244
241245#keyset[bicep_for_statement, index]
242246bicep_for_statement_child(
@@ -289,7 +293,7 @@ bicep_import_statement_def(
289293 unique int id: @bicep_import_statement
290294);
291295
292- @bicep_import_with_statement_child_type = @bicep_expression | @bicep_string__ | @bicep_token_identifier
296+ @bicep_import_with_statement_child_type = @bicep_string__ | @bicep_token_identifier | @bicep_underscore_expression
293297
294298#keyset[bicep_import_with_statement, index]
295299bicep_import_with_statement_child(
@@ -306,7 +310,7 @@ bicep_import_with_statement_def(
306310bicep_infrastructure_child(
307311 int bicep_infrastructure: @bicep_infrastructure ref,
308312 int index: int ref,
309- unique int child: @bicep_statement ref
313+ unique int child: @bicep_underscore_statement ref
310314);
311315
312316bicep_infrastructure_def(
@@ -315,29 +319,29 @@ bicep_infrastructure_def(
315319
316320bicep_interpolation_def(
317321 unique int id: @bicep_interpolation,
318- int child: @bicep_expression ref
322+ int child: @bicep_underscore_expression ref
319323);
320324
321325#keyset[bicep_lambda_expression, index]
322326bicep_lambda_expression_child(
323327 int bicep_lambda_expression: @bicep_lambda_expression ref,
324328 int index: int ref,
325- unique int child: @bicep_expression ref
329+ unique int child: @bicep_underscore_expression ref
326330);
327331
328332bicep_lambda_expression_def(
329333 unique int id: @bicep_lambda_expression
330334);
331335
332- @bicep_member_expression_object_type = @bicep_expression | @bicep_parameterized_type
336+ @bicep_member_expression_object_type = @bicep_parameterized_type | @bicep_underscore_expression
333337
334338bicep_member_expression_def(
335339 unique int id: @bicep_member_expression,
336340 int object: @bicep_member_expression_object_type ref,
337341 int property: @bicep_token_property_identifier ref
338342);
339343
340- @bicep_metadata_declaration_child_type = @bicep_expression | @bicep_token_identifier
344+ @bicep_metadata_declaration_child_type = @bicep_token_identifier | @bicep_underscore_expression
341345
342346#keyset[bicep_metadata_declaration, index]
343347bicep_metadata_declaration_child(
@@ -368,7 +372,7 @@ bicep_negated_type_def(
368372 int child: @bicep_type__ ref
369373);
370374
371- @bicep_nullable_type_child_type = @bicep_array_type | @bicep_expression | @bicep_parenthesized_type | @bicep_token_primitive_type
375+ @bicep_nullable_type_child_type = @bicep_array_type | @bicep_parenthesized_type | @bicep_token_primitive_type | @bicep_underscore_expression
372376
373377bicep_nullable_type_def(
374378 unique int id: @bicep_nullable_type,
@@ -388,7 +392,7 @@ bicep_object_def(
388392 unique int id: @bicep_object
389393);
390394
391- @bicep_object_property_child_type = @bicep_array_type | @bicep_compatible_identifier | @bicep_expression | @ bicep_nullable_type | @bicep_parameterized_type | @bicep_resource_declaration | @bicep_string__ | @bicep_token_identifier | @bicep_token_primitive_type | @bicep_union_type
395+ @bicep_object_property_child_type = @bicep_array_type | @bicep_compatible_identifier | @bicep_nullable_type | @bicep_parameterized_type | @bicep_resource_declaration | @bicep_string__ | @bicep_token_identifier | @bicep_token_primitive_type | @bicep_underscore_expression | @bicep_union_type
392396
393397#keyset[bicep_object_property, index]
394398bicep_object_property_child(
@@ -401,7 +405,7 @@ bicep_object_property_def(
401405 unique int id: @bicep_object_property
402406);
403407
404- @bicep_output_declaration_child_type = @bicep_expression | @bicep_token_identifier | @bicep_type__
408+ @bicep_output_declaration_child_type = @bicep_token_identifier | @bicep_type__ | @bicep_underscore_expression
405409
406410#keyset[bicep_output_declaration, index]
407411bicep_output_declaration_child(
@@ -427,7 +431,7 @@ bicep_parameter_def(
427431 unique int id: @bicep_parameter
428432);
429433
430- @bicep_parameter_declaration_child_type = @bicep_expression | @bicep_token_identifier | @bicep_type__
434+ @bicep_parameter_declaration_child_type = @bicep_token_identifier | @bicep_type__ | @bicep_underscore_expression
431435
432436#keyset[bicep_parameter_declaration, index]
433437bicep_parameter_declaration_child(
@@ -468,7 +472,7 @@ bicep_parameters_def(
468472bicep_parenthesized_expression_child(
469473 int bicep_parenthesized_expression: @bicep_parenthesized_expression ref,
470474 int index: int ref,
471- unique int child: @bicep_expression ref
475+ unique int child: @bicep_underscore_expression ref
472476);
473477
474478bicep_parenthesized_expression_def(
@@ -480,8 +484,6 @@ bicep_parenthesized_type_def(
480484 int child: @bicep_type__ ref
481485);
482486
483- @bicep_primary_expression = @bicep_array | @bicep_call_expression | @bicep_for_statement | @bicep_member_expression | @bicep_object | @bicep_parenthesized_expression | @bicep_resource_expression | @bicep_string__ | @bicep_subscript_expression | @bicep_token_boolean | @bicep_token_identifier | @bicep_token_null | @bicep_token_number
484-
485487@bicep_resource_declaration_child_type = @bicep_for_statement | @bicep_if_statement | @bicep_object | @bicep_string__ | @bicep_token_identifier
486488
487489#keyset[bicep_resource_declaration, index]
@@ -497,12 +499,10 @@ bicep_resource_declaration_def(
497499
498500bicep_resource_expression_def(
499501 unique int id: @bicep_resource_expression,
500- int object: @bicep_expression ref,
502+ int object: @bicep_underscore_expression ref,
501503 int resource: @bicep_token_identifier ref
502504);
503505
504- @bicep_statement = @bicep_declaration | @bicep_decorators | @bicep_import_functionality | @bicep_import_statement | @bicep_import_with_statement | @bicep_target_scope_assignment | @bicep_using_statement
505-
506506@bicep_string_child_type = @bicep_interpolation | @bicep_token_escape_sequence | @bicep_token_string_content
507507
508508#keyset[bicep_string__, index]
@@ -518,8 +518,8 @@ bicep_string_def(
518518
519519bicep_subscript_expression_def(
520520 unique int id: @bicep_subscript_expression,
521- int index: @bicep_expression ref,
522- int object: @bicep_expression ref
521+ int index: @bicep_underscore_expression ref,
522+ int object: @bicep_underscore_expression ref
523523);
524524
525525bicep_target_scope_assignment_def(
@@ -529,9 +529,9 @@ bicep_target_scope_assignment_def(
529529
530530bicep_ternary_expression_def(
531531 unique int id: @bicep_ternary_expression,
532- int alternative: @bicep_expression ref,
533- int condition: @bicep_expression ref,
534- int consequence: @bicep_expression ref
532+ int alternative: @bicep_underscore_expression ref,
533+ int condition: @bicep_underscore_expression ref,
534+ int consequence: @bicep_underscore_expression ref
535535);
536536
537537@bicep_test_block_child_type = @bicep_object | @bicep_string__ | @bicep_token_identifier
@@ -565,7 +565,7 @@ bicep_type_arguments_def(
565565 unique int id: @bicep_type_arguments
566566);
567567
568- @bicep_type_declaration_child_type = @bicep_array_type | @bicep_expression | @bicep_nullable_type | @bicep_parameterized_type | @bicep_token_identifier | @bicep_union_type
568+ @bicep_type_declaration_child_type = @bicep_array_type | @bicep_nullable_type | @bicep_parameterized_type | @bicep_token_identifier | @bicep_underscore_expression | @bicep_union_type
569569
570570#keyset[bicep_type_declaration, index]
571571bicep_type_declaration_child(
@@ -586,11 +586,11 @@ case @bicep_unary_expression.operator of
586586
587587bicep_unary_expression_def(
588588 unique int id: @bicep_unary_expression,
589- int argument: @bicep_expression ref,
589+ int argument: @bicep_underscore_expression ref,
590590 int operator: int ref
591591);
592592
593- @bicep_union_type_child_type = @bicep_array_type | @bicep_expression | @ bicep_member_expression | @bicep_negated_type | @bicep_nullable_type | @bicep_object | @bicep_parameterized_type | @bicep_parenthesized_type | @bicep_string__ | @bicep_token_boolean | @bicep_token_identifier | @bicep_token_null | @bicep_token_number | @bicep_token_primitive_type
593+ @bicep_union_type_child_type = @bicep_array_type | @bicep_member_expression | @bicep_negated_type | @bicep_nullable_type | @bicep_object | @bicep_parameterized_type | @bicep_parenthesized_type | @bicep_string__ | @bicep_token_boolean | @bicep_token_identifier | @bicep_token_null | @bicep_token_number | @bicep_token_primitive_type | @bicep_underscore_expression
594594
595595#keyset[bicep_union_type, index]
596596bicep_union_type_child(
@@ -603,7 +603,7 @@ bicep_union_type_def(
603603 unique int id: @bicep_union_type
604604);
605605
606- @bicep_user_defined_function_child_type = @bicep_expression | @bicep_parameters
606+ @bicep_user_defined_function_child_type = @bicep_parameters | @bicep_underscore_expression
607607
608608#keyset[bicep_user_defined_function, index]
609609bicep_user_defined_function_child(
@@ -623,7 +623,7 @@ bicep_using_statement_def(
623623 int child: @bicep_string__ ref
624624);
625625
626- @bicep_variable_declaration_child_type = @bicep_expression | @bicep_token_identifier
626+ @bicep_variable_declaration_child_type = @bicep_token_identifier | @bicep_underscore_expression
627627
628628#keyset[bicep_variable_declaration, index]
629629bicep_variable_declaration_child(
0 commit comments