adding in noteq
This commit is contained in:
parent
ccfcefe207
commit
0424446d56
@ -152,6 +152,7 @@ class HyASTCompiler(object):
|
|||||||
ctx=ast.Load())
|
ctx=ast.Load())
|
||||||
|
|
||||||
@builds("=")
|
@builds("=")
|
||||||
|
@builds("!=")
|
||||||
@builds("<")
|
@builds("<")
|
||||||
@builds("<=")
|
@builds("<=")
|
||||||
@builds(">")
|
@builds(">")
|
||||||
@ -161,8 +162,8 @@ class HyASTCompiler(object):
|
|||||||
@builds("is-not")
|
@builds("is-not")
|
||||||
@builds("not-in")
|
@builds("not-in")
|
||||||
def compile_compare_op_expression(self, expression):
|
def compile_compare_op_expression(self, expression):
|
||||||
# NotEq | Lt | LtE | Gt | GtE | Is | IsNot | In | NotIn
|
|
||||||
ops = {"=": ast.Eq,
|
ops = {"=": ast.Eq,
|
||||||
|
"!=": ast.NotEq,
|
||||||
"<": ast.Lt,
|
"<": ast.Lt,
|
||||||
"<=": ast.LtE,
|
"<=": ast.LtE,
|
||||||
">": ast.Gt,
|
">": ast.Gt,
|
||||||
|
@ -20,6 +20,11 @@
|
|||||||
(assert (not-in "f" ["a" "b" "c" "d"])))
|
(assert (not-in "f" ["a" "b" "c" "d"])))
|
||||||
|
|
||||||
|
|
||||||
|
(defn test_noteq []
|
||||||
|
"NATIVE: not eq"
|
||||||
|
(assert (!= 2 3)))
|
||||||
|
|
||||||
|
|
||||||
(defn test_numops []
|
(defn test_numops []
|
||||||
"NATIVE: test numpos"
|
"NATIVE: test numpos"
|
||||||
(assert (> 5 4 3 2 1))
|
(assert (> 5 4 3 2 1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user