diff --git a/Sources/Errors.swift b/Sources/Errors.swift index 07ee702..787688a 100644 --- a/Sources/Errors.swift +++ b/Sources/Errors.swift @@ -37,11 +37,6 @@ public struct TemplateSyntaxError : Error, Equatable, CustomStringConvertible { public init(_ description: String) { self.init(reason: description) } - - public static func ==(lhs:TemplateSyntaxError, rhs:TemplateSyntaxError) -> Bool { - return lhs.description == rhs.description && lhs.token == rhs.token && lhs.stackTrace == rhs.stackTrace - } - } extension Error { diff --git a/Sources/Tokenizer.swift b/Sources/Tokenizer.swift index f0503ec..54e6891 100644 --- a/Sources/Tokenizer.swift +++ b/Sources/Tokenizer.swift @@ -114,21 +114,4 @@ public enum Token : Equatable { return sourceMap } } - -} - - -public func == (lhs: Token, rhs: Token) -> Bool { - switch (lhs, rhs) { - case let (.text(lhsValue, lhsAt), .text(rhsValue, rhsAt)): - return lhsValue == rhsValue && lhsAt == rhsAt - case let (.variable(lhsValue, lhsAt), .variable(rhsValue, rhsAt)): - return lhsValue == rhsValue && lhsAt == rhsAt - case let (.block(lhsValue, lhsAt), .block(rhsValue, rhsAt)): - return lhsValue == rhsValue && lhsAt == rhsAt - case let (.comment(lhsValue, lhsAt), .comment(rhsValue, rhsAt)): - return lhsValue == rhsValue && lhsAt == rhsAt - default: - return false - } } diff --git a/Sources/Variable.swift b/Sources/Variable.swift index 05b8738..d9620ed 100644 --- a/Sources/Variable.swift +++ b/Sources/Variable.swift @@ -128,10 +128,6 @@ public struct Variable : Equatable, Resolvable { } } -public func ==(lhs: Variable, rhs: Variable) -> Bool { - return lhs.variable == rhs.variable -} - /// A structure used to represet range of two integer values expressed as `from...to`. /// Values should be numbers (they will be converted to integers). /// Rendering this variable produces array from range `from...to`.