forked from jasder/antlr
parent
f08de81805
commit
657ab4b3b4
|
@ -34,22 +34,11 @@ public class LookupATNConfig: Hashable {
|
|||
}
|
||||
|
||||
public func ==(lhs: LookupATNConfig, rhs: LookupATNConfig) -> Bool {
|
||||
|
||||
|
||||
if lhs.config === rhs.config {
|
||||
return true
|
||||
}
|
||||
|
||||
if (lhs is OrderedATNConfig) && (rhs is OrderedATNConfig) {
|
||||
return lhs.config == rhs.config
|
||||
}
|
||||
|
||||
|
||||
let same: Bool =
|
||||
lhs.config.state.stateNumber == rhs.config.state.stateNumber &&
|
||||
return lhs.config.state.stateNumber == rhs.config.state.stateNumber &&
|
||||
lhs.config.alt == rhs.config.alt &&
|
||||
lhs.config.semanticContext == rhs.config.semanticContext
|
||||
|
||||
return same
|
||||
|
||||
}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
///
|
||||
/// Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
||||
/// Use of this file is governed by the BSD 3-clause license that
|
||||
/// can be found in the LICENSE.txt file in the project root.
|
||||
///
|
||||
|
||||
//
|
||||
// OrderedATNConfig.swift
|
||||
// objc2swiftwithswith
|
||||
//
|
||||
// Created by janyou on 15/9/14.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class OrderedATNConfig: LookupATNConfig {
|
||||
override
|
||||
public var hashValue: Int {
|
||||
return config.hashValue
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//useless
|
||||
public func ==(lhs: OrderedATNConfig, rhs: OrderedATNConfig) -> Bool {
|
||||
|
||||
if lhs.config === rhs.config {
|
||||
return true
|
||||
}
|
||||
|
||||
return lhs.config == rhs.config
|
||||
|
||||
}
|
Loading…
Reference in New Issue