diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-08-10 02:11:29 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-08-10 02:11:29 +0300 |
commit | 20d850d21f58c256abbad241e0c444d173c60834 (patch) | |
tree | f477444545fc87bb56f6af0891e184473d40f194 | |
parent | 98da65f8ccef39693171b8c4023ef2bbf58d9add (diff) | |
download | meson-20d850d21f58c256abbad241e0c444d173c60834.zip meson-20d850d21f58c256abbad241e0c444d173c60834.tar.gz meson-20d850d21f58c256abbad241e0c444d173c60834.tar.bz2 |
Precedence fix.
-rw-r--r-- | interpreter.py | 4 | ||||
-rw-r--r-- | mparser.py | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/interpreter.py b/interpreter.py index 45aa3b0..5095640 100644 --- a/interpreter.py +++ b/interpreter.py @@ -1326,7 +1326,9 @@ class Interpreter(): val2 = v2 else: val2 = v2.get_value() - assert(type(val1) == type(val2)) + if type(val1) != type(val2): + raise InterpreterException('Comparison of different types %s and %s.' % + (str(type(val1)), str(type(val2)))) if node.get_ctype() == '==': return val1 == val2 elif node.get_ctype() == '!=': @@ -69,10 +69,10 @@ t_ignore = ' \t' precedence = ( ('left', 'COMMA'), ('left', 'ASSIGN'), -('nonassoc', 'EQUALS', 'NEQUALS'), ('left', 'OR'), ('left', 'AND'), ('right', 'NOT'), +('nonassoc', 'EQUALS', 'NEQUALS'), ('nonassoc', 'COLON'), ('left', 'DOT'), ) |