mirror of
https://github.com/github/semantic.git
synced 2024-12-26 08:25:19 +03:00
Merge branch 'literal-syntax-construction' into restrict-comparisons-by-category
This commit is contained in:
commit
9a6e8dea03
@ -42,6 +42,24 @@ public enum Syntax<Recur, A>: CustomDebugStringConvertible, CustomDocConvertible
|
||||
}
|
||||
|
||||
|
||||
// MARK: - ArrayLiteralConvertible
|
||||
|
||||
extension Syntax: ArrayLiteralConvertible {
|
||||
public init(arrayLiteral: Recur...) {
|
||||
self = .Indexed(arrayLiteral)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - DictionaryLiteralConvertible
|
||||
|
||||
extension Syntax: DictionaryLiteralConvertible {
|
||||
public init(dictionaryLiteral elements: (String, Recur)...) {
|
||||
self = .Keyed(Dictionary(elements: elements))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// MARK: - Equality
|
||||
|
||||
extension Syntax {
|
||||
|
Loading…
Reference in New Issue
Block a user