summaryrefslogtreecommitdiff
path: root/src/interpreter/builtins.ts
diff options
context:
space:
mode:
authorLizzy Hunt <lizzy.hunt@usu.edu>2024-02-28 15:29:52 -0700
committerLizzy Hunt <lizzy.hunt@usu.edu>2024-02-28 15:29:52 -0700
commit9d1bd0d489870a1d9a3c971542a248def9d84b0d (patch)
tree6d18ad735c45f14503209cb1c7d7d6db27342740 /src/interpreter/builtins.ts
parent3d3942a80f710247fef1f7c4d9e0dc89daf98b36 (diff)
downloadcps-interpreter-9d1bd0d489870a1d9a3c971542a248def9d84b0d.tar.gz
cps-interpreter-9d1bd0d489870a1d9a3c971542a248def9d84b0d.zip
remove negation operator on integersHEADmain
Diffstat (limited to 'src/interpreter/builtins.ts')
-rw-r--r--src/interpreter/builtins.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/interpreter/builtins.ts b/src/interpreter/builtins.ts
index 16322f1..433139a 100644
--- a/src/interpreter/builtins.ts
+++ b/src/interpreter/builtins.ts
@@ -12,10 +12,7 @@ const addUnaryIntegerOperationsTo = (env: Environment) => {
},
];
- for (const { name, fn } of [
- { name: '~', fn: (a: number) => ~a },
- { name: '!', fn: (a: number) => (!a ? 1 : 0) },
- ]) {
+ for (const { name, fn } of [{ name: '~', fn: (a: number) => ~a }]) {
env.set(name, {
type: 'function',
value: {