From: Chase <44284917+TotallyNotChase@users.noreply.github.com> Date: Fri, 2 Oct 2020 15:58:47 +0000 (+0800) Subject: :art: Make scan0_section use similar style as scan<1/2>_section X-Git-Tag: nightly~1250^2^2 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=371abd50bffd5dece7975b82a5e1edf22ce1c990;p=gwion.git :art: Make scan0_section use similar style as scan<1/2>_section --- diff --git a/src/parse/scan0.c b/src/parse/scan0.c index 845b40b2..4cfecfdd 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -366,21 +366,8 @@ ANN static m_bool scan0_stmt_list(const Env env, Stmt_List list) { return GW_OK; } -ANN static m_bool scan0_section(const Env env, const Section* section) { - if(section->section_type == ae_section_class) - return scan0_class_def(env, section->d.class_def); - if(section->section_type == ae_section_enum) - return scan0_enum_def(env, section->d.enum_def); - if(section->section_type == ae_section_union) - return scan0_union_def(env, section->d.union_def); - if(section->section_type == ae_section_fptr) - return scan0_fptr_def(env, section->d.fptr_def); - if(section->section_type == ae_section_type) - return scan0_type_def(env, section->d.type_def); - if(section->section_type == ae_section_type) - return scan0_stmt_list(env, section->d.stmt_list); - return GW_OK; -} +#define scan0_func_def dummy_func +HANDLE_SECTION_FUNC(scan0, m_bool, Env) ANN static m_bool scan0_class_def_inner(const Env env, const Class_Def cdef) { CHECK_OB((cdef->base.type = scan0_class_def_init(env, cdef)))