absyntax_utils/search_base_type.cc
changeset 793 268bf4ca5fa1
parent 726 9b61eb4f00dc
parent 706 31553c22f318
child 808 7a6b53d61ea3
--- a/absyntax_utils/search_base_type.cc	Thu Jan 03 17:04:04 2013 +0000
+++ b/absyntax_utils/search_base_type.cc	Thu Jan 03 18:23:07 2013 +0000
@@ -102,6 +102,12 @@
   return search_base_type_singleton->is_enumerated;
 }
 
+bool search_base_type_c::type_is_fb(symbol_c* type_decl) {
+  create_singleton();
+  search_base_type_singleton->is_fb = false;
+  type_decl->accept(*search_base_type_singleton);
+  return search_base_type_singleton->is_fb;
+}
 
 /*************************/
 /* B.1 - Common elements */
@@ -373,7 +379,10 @@
 /*****************************/
 /*  FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */
 // SYM_REF3(function_block_declaration_c, fblock_name, var_declarations, fblock_body)
-void *search_base_type_c::visit(function_block_declaration_c *symbol)                   {return (void *)symbol;}
+void *search_base_type_c::visit(function_block_declaration_c *symbol)                   {
+	this->is_fb = true;
+	return (void *)symbol;
+}