absyntax_utils/search_base_type.cc
changeset 793 268bf4ca5fa1
parent 726 9b61eb4f00dc
parent 706 31553c22f318
child 808 7a6b53d61ea3
equal deleted inserted replaced
785:b08167f156a1 793:268bf4ca5fa1
   100   search_base_type_singleton->is_enumerated = false;
   100   search_base_type_singleton->is_enumerated = false;
   101   type_decl->accept(*search_base_type_singleton);
   101   type_decl->accept(*search_base_type_singleton);
   102   return search_base_type_singleton->is_enumerated;
   102   return search_base_type_singleton->is_enumerated;
   103 }
   103 }
   104 
   104 
       
   105 bool search_base_type_c::type_is_fb(symbol_c* type_decl) {
       
   106   create_singleton();
       
   107   search_base_type_singleton->is_fb = false;
       
   108   type_decl->accept(*search_base_type_singleton);
       
   109   return search_base_type_singleton->is_fb;
       
   110 }
   105 
   111 
   106 /*************************/
   112 /*************************/
   107 /* B.1 - Common elements */
   113 /* B.1 - Common elements */
   108 /*************************/
   114 /*************************/
   109 
   115 
   371 /*****************************/
   377 /*****************************/
   372 /* B 1.5.2 - Function Blocks */
   378 /* B 1.5.2 - Function Blocks */
   373 /*****************************/
   379 /*****************************/
   374 /*  FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */
   380 /*  FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */
   375 // SYM_REF3(function_block_declaration_c, fblock_name, var_declarations, fblock_body)
   381 // SYM_REF3(function_block_declaration_c, fblock_name, var_declarations, fblock_body)
   376 void *search_base_type_c::visit(function_block_declaration_c *symbol)                   {return (void *)symbol;}
   382 void *search_base_type_c::visit(function_block_declaration_c *symbol)                   {
       
   383 	this->is_fb = true;
       
   384 	return (void *)symbol;
       
   385 }
   377 
   386 
   378 
   387 
   379 
   388 
   380 /*********************************************/
   389 /*********************************************/
   381 /* B.1.6  Sequential function chart elements */
   390 /* B.1.6  Sequential function chart elements */