TokenList
TokenList
represents a collection of TokenSyntax
s.
struct TokenList
TokenList
represents a collection of TokenSyntax
s.
struct TokenList
init([TokenSyntax])
Creates a TokenList
with the provided list of elements.
init(arrayLiteral: TokenSyntax...)
Creates an instance initialized with the given elements.
func buildSyntax(format: Format, leadingTrivia: Trivia?) -> Syntax
Builds a Syntax
.
func buildSyntaxList(format: Format, leadingTrivia: Trivia?) -> [Syntax]
Builds list of Syntax
s.
func buildTokenList(format: Format, leadingTrivia: Trivia?) -> TokenListSyntax
func createAttributeList() -> AttributeList
Conformance to ExpressibleAsAttributeList
.
func createPrecedenceGroupAttributeList() -> PrecedenceGroupAttributeList
Conformance to ExpressibleAsPrecedenceGroupAttributeList
.
func createSpecializeAttributeSpecList() -> SpecializeAttributeSpecList
Conformance to ExpressibleAsSpecializeAttributeSpecList
.
func createStringLiteralSegments() -> StringLiteralSegments
Conformance to ExpressibleAsStringLiteralSegments
.
func createSwitchCaseList() -> SwitchCaseList
Conformance to ExpressibleAsSwitchCaseList
.
func createSyntaxBuildable() -> SyntaxBuildable
TokenList
might conform to SyntaxBuildable
via different ExpressibleAs*
paths. Thus, there are multiple default implementations for createSyntaxBuildable
, some of which perform conversions through ExpressibleAs*
protocols. To resolve the ambiguity, provide a fixed implementation that doesn’t perform any conversions.
func createTokenList() -> TokenList
Conformance to ExpressibleAsTokenList
.