DelimitedCommaSeparatedList
struct DelimitedCommaSeparatedList<E> : Combinator where E : Combinator, E.Context == ParserState
A combinator that parses comma-separated lists of elements delimited by tokens on both ends.
-
Declaration
Swift
typealias Context = ParserState -
The result of a comma-separated list parser.
See moreDeclaration
Swift
struct Element -
The kind of the left delimiter.
Declaration
Swift
let openerKind: Token.Kind -
The kind of the right delimiter.
Declaration
Swift
let closerKind: Token.Kind -
The description of the right delimiter (for diagnostics).
Declaration
Swift
let closerDescription: String -
The parser recognizing the list’s elements.
Declaration
Swift
let elementParser: E -
Declaration
Swift
func parse(_ state: inout ParserState) throws -> Element?
View on GitHub