mirror of
https://github.com/janet-lang/janet
synced 2025-11-09 20:13:02 +00:00
Add proper optional arguments.
Use &opt in the parameter list to get optional arguments.
This commit is contained in:
@@ -643,6 +643,7 @@ JanetFuncDef *janetc_pop_funcdef(JanetCompiler *c) {
|
||||
def->source = c->source;
|
||||
|
||||
def->arity = 0;
|
||||
def->min_arity = 0;
|
||||
def->flags = 0;
|
||||
if (scope->flags & JANET_SCOPE_ENV) {
|
||||
def->flags |= JANET_FUNCDEF_FLAG_NEEDSENV;
|
||||
|
||||
Reference in New Issue
Block a user