File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1005,6 +1005,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
10051005 // report a distinct `subscriptCallExpr`, so giving
10061006 // subscripts their own shape needs only a `subscript_expr` node in
10071007 // ast_types.yml and a remap here.
1008+ coerce_to_pattern!( subscriptCallExpr) ,
10081009 rule!(
10091010 ( subscriptCallExpr calledExpression: @callee arguments: _* @args)
10101011 =>
Original file line number Diff line number Diff line change @@ -425,17 +425,15 @@ top_level
425425 name_expr
426426 identifier: identifier "y"
427427 string_literal
428- call_expr <-- ERROR: The field or_pattern.pattern should contain pattern, but got call_expr
429- callee :
430- expr_equality_pattern <-- ERROR: The field call_expr.callee should contain expr_or_type, but got expr_equality_pattern
431- expr :
428+ expr_equality_pattern
429+ expr :
430+ call_expr
431+ callee :
432432 name_expr
433433 identifier: identifier "y"
434- argument:
435- pattern_element <-- ERROR: The field call_expr.argument should contain argument, but got pattern_element
436- pattern:
437- expr_equality_pattern
438- expr: int_literal "4"
434+ argument:
435+ argument
436+ value: int_literal "4"
439437 body:
440438 block
441439 stmt:
You can’t perform that action at this time.
0 commit comments