summaryrefslogtreecommitdiff
path: root/uscript/parser.c
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-04-17 20:06:02 -0400
committeriamcheeseman <[email protected]>2026-04-17 20:06:02 -0400
commita4677cf4301f378c6338f2f29408f83f91053516 (patch)
treec4b5c69383d8317d0d91fc68be929af8555d95fa /uscript/parser.c
parentbdc4806f5ddc90aea8840225fd8993e305b7ad10 (diff)
microscript: change ! to not
Diffstat (limited to 'uscript/parser.c')
-rw-r--r--uscript/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/uscript/parser.c b/uscript/parser.c
index 7909f98..dc721d5 100644
--- a/uscript/parser.c
+++ b/uscript/parser.c
@@ -516,7 +516,7 @@ void parse_unary(struct parser *p)
switch (op.kind) {
case '-': parser_add_byte(p, BC_NEG); break;
- case '!': parser_add_byte(p, BC_NOT); break;
+ case TOKEN_NOT: parser_add_byte(p, BC_NOT); break;
}
}
@@ -601,7 +601,6 @@ struct expr expressions[] = {
['<'] = {NULL, parse_binary, PREC_COMP},
['>'] = {NULL, parse_binary, PREC_COMP},
['='] = {NULL, NULL, PREC_NONE},
- ['!'] = {parse_unary, NULL, PREC_NONE},
[TOKEN_AND] = {NULL, parse_and, PREC_AND},
[TOKEN_BREAK] = {NULL, NULL, PREC_NONE},
[TOKEN_DIV_EQL] = {NULL, NULL, PREC_NONE},
@@ -627,6 +626,7 @@ struct expr expressions[] = {
[TOKEN_MULT_EQL] = {NULL, NULL, PREC_NONE},
[TOKEN_NEQL] = {NULL, parse_binary, PREC_EQL},
[TOKEN_NEXT] = {NULL, NULL, PREC_NONE},
+ [TOKEN_NOT] = {parse_unary, NULL, PREC_NONE},
[TOKEN_NUM] = {parse_number, NULL, PREC_NONE},
[TOKEN_OR] = {NULL, parse_or, PREC_OR},
[TOKEN_PLUS_EQL] = {NULL, NULL, PREC_NONE},