1
0
mirror of https://github.com/janet-lang/janet synced 2026-04-27 01:01:27 +00:00

Add keyword arguments via &keys.

This makes it easier to document functions that
take keyword arguments and also prevents some allocations
with these functions. Before, this was possible via normal
variadic functions but created an intermediate tuple, and
the generated docstrings did not document the keys.
This commit is contained in:
Calvin Rose
2019-05-24 17:03:22 -04:00
parent ddedae6831
commit 010e2e4652
3 changed files with 46 additions and 6 deletions

View File

@@ -753,6 +753,7 @@ struct JanetAbstractHead {
#define JANET_FUNCDEF_FLAG_HASDEFS 0x200000
#define JANET_FUNCDEF_FLAG_HASENVS 0x400000
#define JANET_FUNCDEF_FLAG_HASSOURCEMAP 0x800000
#define JANET_FUNCDEF_FLAG_STRUCTARG 0x1000000
#define JANET_FUNCDEF_FLAG_TAG 0xFFFF
/* Source mapping structure for a bytecode instruction */