From: nishi Date: Sat, 27 Apr 2024 02:19:35 +0000 (+0000) Subject: define-var to define-variable, define-func to define-subroutine X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=cdc4aa86bb853a959aeb08523ea64c24970c5c71;p=serenade.git define-var to define-variable, define-func to define-subroutine git-svn-id: file:///raid/svn-main/nishi-serenade/trunk@69 0f02c867-ac3d-714e-8a88-971ba1f6efcf --- diff --git a/Serenade/interpreter.c b/Serenade/interpreter.c index 58c9a30..993d808 100644 --- a/Serenade/interpreter.c +++ b/Serenade/interpreter.c @@ -152,7 +152,7 @@ void sn_stdlib_init(struct sn_interpreter* sn) { sn_set_handler(sn, "/", math_handler); sn_set_handler(sn, "print", print_handler); sn_set_handler(sn, "eval", eval_handler); - sn_set_handler(sn, "define-var", defvar_handler); + sn_set_handler(sn, "define-variable", defvar_handler); sn_set_handler(sn, "source", source_handler); } diff --git a/Serenade/run.c b/Serenade/run.c index d7037e4..705c93f 100644 --- a/Serenade/run.c +++ b/Serenade/run.c @@ -77,7 +77,7 @@ struct sn_generic* _sn_run(struct sn_interpreter* sn, struct sn_generic* gen) { r->string = sn_strdup(SERENADE_VERSION); r->string_length = strlen(r->string); return r; - } else if(strcmp(op->name, "define-func") == 0) { + } else if(strcmp(op->name, "define-subroutine") == 0) { char* name = malloc(gen->tree->args[1]->string_length + 1); memcpy(name, gen->tree->args[1]->string, gen->tree->args[1]->string_length); name[gen->tree->args[1]->string_length] = 0;