]> Nishi Git Mirror - gwion.git/commitdiff
:art: Make scan0_section use similar style as scan<1/2>_section 183/head
authorChase <44284917+TotallyNotChase@users.noreply.github.com>
Fri, 2 Oct 2020 15:58:47 +0000 (23:58 +0800)
committerChase <44284917+TotallyNotChase@users.noreply.github.com>
Fri, 2 Oct 2020 15:58:47 +0000 (23:58 +0800)
src/parse/scan0.c

index 845b40b2b4169d645335931ec8e4725ea64d0af5..4cfecfdd80cee7911b3a2dbd5d0ef5b9a04d7a77 100644 (file)
@@ -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)))