diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-23 12:42:10 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-23 12:42:10 -0400 |
| commit | a1978752141835c386012fff15ceb36261f37997 (patch) | |
| tree | 988084e503a9118ceb48b99b8c8cb0b3453f172b /environment.c | |
| parent | dceb9255736c69538293ee551272cda1b03a9fd3 (diff) | |
Bugfix for say() when length is >512, and added back the `newline`
optional parameter (default=yes)
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/environment.c b/environment.c index f1d2a042..b650004c 100644 --- a/environment.c +++ b/environment.c @@ -31,7 +31,8 @@ env_t *new_compilation_unit(CORD *libname) const char *name; binding_t binding; } global_vars[] = { - {"say", {.code="say", .type=Type(FunctionType, .args=new(arg_t, .name="text", .type=TEXT_TYPE), .ret=Type(VoidType))}}, + {"say", {.code="say", .type=Type(FunctionType, .args=new(arg_t, .name="text", .type=TEXT_TYPE, + .next=new(arg_t, .name="newline", .type=Type(BoolType), .default_val=FakeAST(Bool, true))), .ret=Type(VoidType))}}, {"fail", {.code="fail", .type=Type(FunctionType, .args=new(arg_t, .name="message", .type=TEXT_TYPE), .ret=Type(AbortType))}}, {"USE_COLOR", {.code="USE_COLOR", .type=Type(BoolType)}}, }; |
