Some data-type check functions (e.g. IsInteger()) exported
This commit is contained in:
+2
-2
@@ -35,14 +35,14 @@ func evalSign(ctx ExprContext, self *term) (v any, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
if isFloat(rightValue) {
|
||||
if IsFloat(rightValue) {
|
||||
if self.tk.Sym == SymChangeSign {
|
||||
f, _ := rightValue.(float64)
|
||||
v = -f
|
||||
} else {
|
||||
v = rightValue
|
||||
}
|
||||
} else if isInteger(rightValue) {
|
||||
} else if IsInteger(rightValue) {
|
||||
if self.tk.Sym == SymChangeSign {
|
||||
i, _ := rightValue.(int64)
|
||||
v = -i
|
||||
|
||||
Reference in New Issue
Block a user