refactor: Deal with Number instead of Float80

This commit is contained in:
Kyle Fuller
2016-12-07 19:54:29 +00:00
parent 2d507e7c11
commit aa7c36296b
2 changed files with 25 additions and 22 deletions

View File

@@ -1,6 +1,9 @@
import Foundation
typealias Number = Float80
class FilterExpression : Resolvable {
let filters: [(FilterType, [Variable])]
let variable: Variable
@@ -60,7 +63,7 @@ public struct Variable : Equatable, Resolvable {
return variable[variable.characters.index(after: variable.startIndex) ..< variable.characters.index(before: variable.endIndex)]
}
if let number = Float80(variable) {
if let number = Number(variable) {
// Number literal
return number
}