1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-31 07:33:01 +00:00

Add beginning of intorductory doc. Add prototypes to pretty print

output.
This commit is contained in:
Calvin Rose
2018-04-30 17:05:42 -04:00
parent 53f9c18669
commit 1205ca5cad
5 changed files with 189 additions and 29 deletions

View File

@@ -237,10 +237,8 @@ void dst_table_merge_struct(DstTable *table, const DstKV *other) {
static int cfun_tostruct(DstArgs args) {
DstTable *t;
if (args.n != 1 || !dst_checktype(args.v[0], DST_TABLE)) {
return dst_throw(args, "expected table");
}
t = dst_unwrap_table(args.v[0]);
dst_fixarity(args, 1);
dst_arg_table(t, args, 0);
return dst_return(args, dst_wrap_struct(dst_table_to_struct(t)));
}