From 724663e268a482b7fe61974b35f18fe8389b2610 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Tue, 15 Oct 2019 15:45:02 +0000 Subject: [PATCH] code clean-up --- moo/lib/comp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/moo/lib/comp.c b/moo/lib/comp.c index 829295f..6b2f36c 100644 --- a/moo/lib/comp.c +++ b/moo/lib/comp.c @@ -4864,7 +4864,6 @@ static MOO_INLINE int find_undotted_ident (moo_t* moo, const moo_oocs_t* name, c case MOO_CUNIT_INTERFACE: { - /* TODO: */ moo_cunit_interface_t* ifce = ((moo_cunit_interface_t*)moo->c->cunit); if (ifce->self_oop) @@ -4987,7 +4986,7 @@ static int store_tmpr_count_for_block (moo_t* moo, moo_oow_t tmpr_count) moo_oow_t* tmp; moo_oow_t new_capa; - new_capa = MOO_ALIGN (md->blk_depth + 1, BLK_TMPRCNT_BUFFER_ALIGN); + new_capa = MOO_ALIGN(md->blk_depth + 1, BLK_TMPRCNT_BUFFER_ALIGN); tmp = (moo_oow_t*)moo_reallocmem(moo, md->blk_tmprcnt, new_capa * MOO_SIZEOF(*tmp)); if (!tmp) return -1; @@ -5021,7 +5020,9 @@ static int compile_block_expression (moo_t* moo) if (md->loop) { - /* this block is placed inside the {} loop */ + /* this [] block is placed inside the {} loop. + * this counter is used to check if 'break' or 'countinue' is + * placed inside [], which is prohibited. */ md->loop->blkcount++; } block_loc = *TOKEN_LOC(moo);