diff --git a/prototype/Doubt/Syntax.swift b/prototype/Doubt/Syntax.swift index 47cf327c8..19f36ee3d 100644 --- a/prototype/Doubt/Syntax.swift +++ b/prototype/Doubt/Syntax.swift @@ -42,6 +42,24 @@ public enum Syntax: 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 {