diff options
author | Damien George <damien.p.george@gmail.com> | 2019-07-25 12:10:45 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-09-26 14:37:26 +1000 |
commit | 6ce7c051e853e631802aedd39cbffb14dc3f123c (patch) | |
tree | f503032cee6eb6375de62d1a0c9d878a6e616478 /py/runtime0.h | |
parent | 78e0e76b4f91e7c51d757779814447eeaab54f9a (diff) |
py/lexer: Reorder operator tokens to match corresponding binary ops.
Diffstat (limited to 'py/runtime0.h')
-rw-r--r-- | py/runtime0.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/runtime0.h b/py/runtime0.h index efd439196..e80e272ae 100644 --- a/py/runtime0.h +++ b/py/runtime0.h @@ -70,7 +70,7 @@ typedef enum { // Note: the first 9+12+12 of these are used in bytecode and changing // them requires changing the bytecode version. typedef enum { - // 9 relational operations, should return a bool + // 9 relational operations, should return a bool; order of first 6 matches corresponding mp_token_kind_t MP_BINARY_OP_LESS, MP_BINARY_OP_MORE, MP_BINARY_OP_EQUAL, @@ -81,7 +81,7 @@ typedef enum { MP_BINARY_OP_IS, MP_BINARY_OP_EXCEPTION_MATCH, - // 12 inplace arithmetic operations + // 12 inplace arithmetic operations; order matches corresponding mp_token_kind_t MP_BINARY_OP_INPLACE_OR, MP_BINARY_OP_INPLACE_XOR, MP_BINARY_OP_INPLACE_AND, @@ -95,7 +95,7 @@ typedef enum { MP_BINARY_OP_INPLACE_MODULO, MP_BINARY_OP_INPLACE_POWER, - // 12 normal arithmetic operations + // 12 normal arithmetic operations; order matches corresponding mp_token_kind_t MP_BINARY_OP_OR, MP_BINARY_OP_XOR, MP_BINARY_OP_AND, |