aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorc2024-04-16 15:19:57 -0400
committerc2024-04-16 15:19:57 -0400
commitc26ffc484d30dce65754c0081baa5402346c703a (patch)
tree0c8c98eed4ba68fac761e26ef63fce8d660bdf55 /src/include
parent2e6d3b3343f8e51bc2f3749017ee8a22d7e8b2f6 (diff)
One may now add and subtract integers.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/doer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/doer.h b/src/include/doer.h
index 30b514e..14f0a31 100644
--- a/src/include/doer.h
+++ b/src/include/doer.h
@@ -72,6 +72,9 @@ static tree_type_t blin_str_cat_args[] = { TREE_TYPE_LSTR, TREE_TYPE_LSTR };
// `+`: Add two integers.
tree_t* blin_add(doer_t* doer);
static tree_type_t blin_add_args[] = { TREE_TYPE_LINT, TREE_TYPE_LINT };
+// `-`: Subtract two integers.
+tree_t* blin_sub(doer_t* doer);
+static tree_type_t blin_sub_args[] = { TREE_TYPE_LINT, TREE_TYPE_LINT };
void doer_do_call(doer_t* doer);
tree_t* doer_do_call_blin(doer_t* doer);
@@ -91,6 +94,7 @@ static blinf_t blinfs[] = {
{ blin_printl, TREE_TYPE_LSTR, blin_printl_args, "printl" },
{ blin_str_cat, TREE_TYPE_LSTR, blin_str_cat_args, "str_cat" },
{ blin_add, TREE_TYPE_LINT, blin_add_args, "+" },
+ { blin_sub, TREE_TYPE_LINT, blin_sub_args, "-" },
};
#endif