diff --git a/moo/kernel/Collect.moo b/moo/kernel/Collect.moo index a6c64aa..86aec09 100644 --- a/moo/kernel/Collect.moo +++ b/moo/kernel/Collect.moo @@ -211,10 +211,10 @@ class Set(Collection) ^ass } - (* __assocPut: is a special internal method used by VM to add an association + (* __put_assoc: is a special internal method used by VM to add an association * to a dictionary with the dictionary/association expression notation. * :{ :( 1, 20 ), :( #moo, 999) } *) - method __assocPut: assoc + method __put_assoc: assoc { | hv ass bs index ntally key | diff --git a/moo/lib/comp.c b/moo/lib/comp.c index 606fa07..810e181 100644 --- a/moo/lib/comp.c +++ b/moo/lib/comp.c @@ -4136,11 +4136,11 @@ static int compile_dictionary_expression (moo_t* moo) if (TOKEN_TYPE(moo) == MOO_IOTOK_ASSPAREN) { moo_oow_t si; - static moo_ooch_t msg[] = { '_', '_', 'a','s','s','o','c','P','u','t',':' }; + static moo_ooch_t msg[] = { '_', '_','p','u','t','_','a','s','s','o','c',':' }; /* don't put '\0' at the back */ moo_oocs_t x; x.ptr = msg; - x.len = 11; + x.len = MOO_COUNTOF(msg); /* [ATTENTION] * if the method returns self, i don't need DUP_STACKTOP and POP_STACKTOP. * if the method retruns something else, DUP_STACKTOP and POP_STACKTOP is needed diff --git a/moo/lib/moo.h b/moo/lib/moo.h index b1ec868..bef1617 100644 --- a/moo/lib/moo.h +++ b/moo/lib/moo.h @@ -1159,7 +1159,7 @@ enum moo_synerrnum_t MOO_SYNERR_WHILE, /* while expected */ MOO_SYNERR_NOASSKEY, /* missing association key */ MOO_SYNERR_NOASSVALUE, /* missing association value */ - MOO_SYNERR_NOASSOC, /* missing association */ + MOO_SYNERR_NOASSOC /* missing association */ }; typedef enum moo_synerrnum_t moo_synerrnum_t;