tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 2207f9bf946c0b78c372cfa3b9f37488b91a2c26
parent d3615060eb8b262893c276c78dd951d9d3c1307c
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Wed,  3 Apr 2019 00:20:38 -0700

Add version primitive

Diffstat:
tisp.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/tisp.c b/tisp.c @@ -1018,6 +1018,13 @@ prim_load(Env env, Val args) return env->none; } +/* list tisp version */ +static Val +prim_version(Env env, Val args) +{ + return mk_str(env, "0.0"); +} + /* environment */ /* add new variable of name key and value v to the given environment */ @@ -1057,6 +1064,7 @@ tisp_env_init(size_t cap) tsp_env_fn(macro); tsp_env_fn(define); tsp_env_fn(load); + tsp_env_fn(version); env->strs = hash_new(cap); env->syms = hash_new(cap);