Skip to content

Commit c3dfbaa

Browse files
paldepindasgerf
andauthored
Unified: Use short-hand notation for concatenation
Co-authored-by: Asger F <asgerf@github.com>
1 parent 78320a0 commit c3dfbaa

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

  • unified/extractor/src/languages/swift

‎unified/extractor/src/languages/swift/swift.rs‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -727,15 +727,12 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
727727
trailingClosure: _? @trailing
728728
additionalTrailingClosures: _* @additional)
729729
=>
730-
macro_call_expr {
731-
let mut arguments = args;
732-
arguments.extend(trailing.into_iter().map(|trailing| tree!((argument value: {trailing}))));
733-
arguments.extend(additional);
734-
tree!((macro_call_expr
735-
macro_name_node: (identifier #{name})
736-
type_argument: {type_args}
737-
argument: {arguments}))
738-
}
730+
(macro_call_expr
731+
macro_name_node: (identifier #{name})
732+
type_argument: {type_args}
733+
argument: {args}
734+
argument: {trailing}
735+
argument: {additional})
739736
),
740737
// Member access (`list.append`). The `declName` is itself a
741738
// `declReferenceExpr`; pull its `baseName` out as the member identifier.

0 commit comments

Comments
 (0)