aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-16 05:32:02 +0200
committerlemon <lsof@mailbox.org>2022-08-16 05:32:02 +0200
commit77b2ae9b24d07770fdd22530bf22061a275cc0f0 (patch)
tree8012f9730b1a2e725b45a2255e7c7a0e6eefc40a /bootstrap
parent73f68a9c5ed4c8139cc1c4f7695da29e5a3fb4c8 (diff)
change 'not' to '!'
it looks nicer
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/all.h1
-rw-r--r--bootstrap/cgen.c1
-rw-r--r--bootstrap/parse.c4
3 files changed, 2 insertions, 4 deletions
diff --git a/bootstrap/all.h b/bootstrap/all.h
index 77f4577..932fbe0 100644
--- a/bootstrap/all.h
+++ b/bootstrap/all.h
@@ -47,7 +47,6 @@ struct span {
_(if) \
_(import) \
_(let) \
- _(not) \
_(or) \
_(return) \
_(sizeof) \
diff --git a/bootstrap/cgen.c b/bootstrap/cgen.c
index 39cbba0..665bdc5 100644
--- a/bootstrap/cgen.c
+++ b/bootstrap/cgen.c
@@ -847,7 +847,6 @@ static void
prelude() {
pri("#include <stdint.h>\n"
"#include <stddef.h>\n"
- "#define not !\n"
"#define and &&\n"
"#define or ||\n");
}
diff --git a/bootstrap/parse.c b/bootstrap/parse.c
index b113618..08f83a8 100644
--- a/bootstrap/parse.c
+++ b/bootstrap/parse.c
@@ -1523,7 +1523,7 @@ pexprefix(struct parser *P) {
tok.t, exprdup(ex)
}
};
- } else if (lexmatch(P, &tok, TKkw_not)) {
+ } else if (lexmatch(P, &tok, '!')) {
struct expr ex = pexprefix(P);
if (ex.ty->t != TYbool)
@@ -1531,7 +1531,7 @@ pexprefix(struct parser *P) {
ex.ty, tok);
return (struct expr) {
Eprefix, tok.span, ty_bool, .unop = {
- 'not', exprdup(ex)
+ '!', exprdup(ex)
}
};
} else if (lexmatch(P, &tok, '*')) {