//## void NameSpace.addTypeCheck(symbol keyword, Func f); static KMETHOD NameSpace_AddTypeCheck(KonohaContext *kctx, KonohaStack *sfp) { ksymbol_t keyword = (ksymbol_t)sfp[1].intValue; SUGAR kNameSpace_AddSugarFunc(kctx, sfp[0].asNameSpace, keyword, SugarFunc_TypeCheck, sfp[2].asFunc); }
static kbool_t global_defineSyntax(KonohaContext *kctx, kNameSpace *ns, KTraceInfo *trace) { SUGAR kNameSpace_AddSugarFunc(kctx, ns, KW_TypeDeclPattern, SugarFunc_TopLevelStatement, new_SugarFunc(ns, Statement_GlobalTypeDecl)); return true; }