diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/ucode/compiler.h | 6 | ||||
-rw-r--r-- | include/ucode/lexer.h | 6 | ||||
-rw-r--r-- | include/ucode/vm.h | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/include/ucode/compiler.h b/include/ucode/compiler.h index c112027..ffe7caf 100644 --- a/include/ucode/compiler.h +++ b/include/ucode/compiler.h @@ -37,11 +37,11 @@ typedef enum { P_COMMA, /* , */ - P_ASSIGN, /* = += -= *= /= %= <<= >>= &= ^= |= */ + P_ASSIGN, /* = += -= *= /= %= <<= >>= &= ^= |= ||= &&= **= ??= */ P_TERNARY, /* ?: */ - P_OR, /* || */ + P_OR, /* || ?? */ P_AND, /* && */ P_BOR, /* | */ P_BXOR, /* ^ */ @@ -55,6 +55,8 @@ typedef enum { P_ADD, /* + - */ P_MUL, /* * / % */ + P_EXP, /* ** */ + P_UNARY, /* ! ~ +… -… ++… --… */ P_INC, /* …++ …-- */ diff --git a/include/ucode/lexer.h b/include/ucode/lexer.h index 30849e0..aa5d78b 100644 --- a/include/ucode/lexer.h +++ b/include/ucode/lexer.h @@ -63,6 +63,7 @@ typedef enum { TK_MUL, TK_DIV, TK_MOD, + TK_EXP, TK_NOT, TK_COMPL, TK_INC, @@ -109,6 +110,11 @@ typedef enum { TK_QLBRACK, TK_QLPAREN, TK_QDOT, + TK_ASEXP, + TK_ASAND, + TK_ASOR, + TK_ASNULLISH, + TK_NULLISH, TK_EOF, TK_ERROR diff --git a/include/ucode/vm.h b/include/ucode/vm.h index 4ba4627..24818a1 100644 --- a/include/ucode/vm.h +++ b/include/ucode/vm.h @@ -77,6 +77,7 @@ __insn(SUB) \ __insn(MUL) \ __insn(DIV) \ __insn(MOD) \ +__insn(EXP) \ __insn(NOT) \ __insn(COMPL) \ __insn(PLUS) \ |