1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-28 15:08:40 +00:00

Correct docs for type form.

This commit is contained in:
Calvin Rose 2020-02-21 20:21:17 -06:00
parent a360cb7922
commit 4b440618d6
2 changed files with 9 additions and 9 deletions

View File

@ -70,10 +70,10 @@ static JanetSlot genericSSI(JanetFopts opts, int op, JanetSlot s, int32_t imm) {
/* Emit an insruction that implements a form by itself. */ /* Emit an insruction that implements a form by itself. */
static JanetSlot opfunction( static JanetSlot opfunction(
JanetFopts opts, JanetFopts opts,
JanetSlot *args, JanetSlot *args,
int op, int op,
Janet defaultArg2) { Janet defaultArg2) {
JanetCompiler *c = opts.compiler; JanetCompiler *c = opts.compiler;
int32_t len; int32_t len;
len = janet_v_count(args); len = janet_v_count(args);
@ -82,7 +82,8 @@ static JanetSlot opfunction(
t = janetc_gettarget(opts); t = janetc_gettarget(opts);
janetc_emit_sss(c, op, t, args[0], janetc_cslot(defaultArg2), 1); janetc_emit_sss(c, op, t, args[0], janetc_cslot(defaultArg2), 1);
return t; return t;
} else if (len == 2) { } else {
/* len == 2 */
t = janetc_gettarget(opts); t = janetc_gettarget(opts);
janetc_emit_sss(c, op, t, args[0], args[1], 1); janetc_emit_sss(c, op, t, args[0], args[1], 1);
} }

View File

@ -599,11 +599,10 @@ static const JanetReg corelib_cfuns[] = {
{ {
"type", janet_core_type, "type", janet_core_type,
JDOC("(type x)\n\n" JDOC("(type x)\n\n"
"Returns the type of x as a keyword symbol. x is one of\n" "Returns the type of x as a keyword. x is one of\n"
"\t:nil\n" "\t:nil\n"
"\t:boolean\n" "\t:boolean\n"
"\t:integer\n" "\t:number\n"
"\t:real\n"
"\t:array\n" "\t:array\n"
"\t:tuple\n" "\t:tuple\n"
"\t:table\n" "\t:table\n"
@ -614,7 +613,7 @@ static const JanetReg corelib_cfuns[] = {
"\t:keyword\n" "\t:keyword\n"
"\t:function\n" "\t:function\n"
"\t:cfunction\n\n" "\t:cfunction\n\n"
"or another symbol for an abstract type.") "or another keyword for an abstract type.")
}, },
{ {
"hash", janet_core_hash, "hash", janet_core_hash,