1
1
mirror of https://github.com/github/semantic.git synced 2025-01-01 19:55:34 +03:00

Add a section mark for Syntax equality.

This commit is contained in:
Rob Rix 2015-10-02 14:12:54 -04:00
parent 6d5fd97552
commit 296dbeea8f

View File

@ -72,6 +72,9 @@ public enum Syntax<Recur, A>: CustomDebugStringConvertible, CustomDocConvertible
}
}
// MARK: - Equality
extension Syntax where A: Equatable {
public static func equals(ifRecur ifRecur: (Recur, Recur) -> Bool)(_ left: Syntax<Recur, A>, _ right: Syntax<Recur, A>) -> Bool {
switch (left, right) {