mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
* Refactor Tuple Type Syntax This patch: - Refactors TypeArgumentListSyntax and TypeArgumentListSyntaxData to use the SyntaxCollection and SyntaxCollectionData APIs. - Refactors TupleTypeElementSyntax to own its trailing comma, and updates the tests accordingly. - Provides an infrastructure for promoting types to use the SyntaxCollection APIs * Addressed comments. * Renamed makeBlankTypeArgumentList() * Update makeTupleType * Changed makeTupleType to take an element list. * Updated comment. * Improved API for creating TupleTypeElementListSyntax'es * Added round-trip test * Removed last TypeArgumentList holdovers. * Fixed round-trip test invocation
7 lines
231 B
Swift
7 lines
231 B
Swift
// RUN: %round-trip-syntax-test --swift-syntax-test %swift-syntax-test --file %s
|
|
|
|
typealias TwoInts = (Int, Int)
|
|
typealias TwoNamedInts = (a: Int, b: Int)
|
|
typealias VoidTuple = ()
|
|
typealias TupleWithTrivia = ( Int , b :Int )
|