diff options
Diffstat (limited to 'environment.c')
| -rw-r--r-- | environment.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/environment.c b/environment.c index eb456030..32e3f7f6 100644 --- a/environment.c +++ b/environment.c @@ -30,8 +30,17 @@ 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, - .next=new(arg_t, .name="newline", .type=Type(BoolType), .default_val=FakeAST(Bool, true))), .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))}}, + {"ask", {.code="ask", .type=Type( + FunctionType, .args=new(arg_t, .name="prompt", .type=TEXT_TYPE, + .next=new(arg_t, .name="bold", .type=Type(BoolType), + .default_val=FakeAST(Bool, true), + .next=new(arg_t, .name="force_tty", .type=Type(BoolType), + .default_val=FakeAST(Bool, true)))), + .ret=TEXT_TYPE)}}, {"fail", {.code="fail", .type=Type(FunctionType, .args=new(arg_t, .name="message", .type=Type(CStringType)), .ret=Type(AbortType))}}, {"USE_COLOR", {.code="USE_COLOR", .type=Type(BoolType)}}, }; |
