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