absyntax_utils/get_datatype_info.cc
changeset 858 c5f145364a4f
parent 832 8cd104e483c6
child 909 8b2a31dea131
equal deleted inserted replaced
857:70c4c259bc3e 858:c5f145364a4f
   290 
   290 
   291 
   291 
   292 
   292 
   293 
   293 
   294 bool get_datatype_info_c::is_subrange(symbol_c *type_symbol) {
   294 bool get_datatype_info_c::is_subrange(symbol_c *type_symbol) {
   295   symbol_c *type_decl = search_base_type_c::get_basetype_decl(type_symbol); /* NOTE: will work correctly once we update the way search_base_type_c works, by adding a new search_effective_type:c */
   295   symbol_c *type_decl = search_base_type_c::get_equivtype_decl(type_symbol); /* NOTE: do NOT call search_base_type_c !! */
   296   if (NULL == type_decl)                                             {return false;}
   296   if (NULL == type_decl)                                             {return false;}
   297   
   297   
   298   if (typeid(*type_decl) == typeid(subrange_type_declaration_c))     {return true;}   /*  subrange_type_name ':' subrange_spec_init */
   298   if (typeid(*type_decl) == typeid(subrange_type_declaration_c))     {return true;}   /*  subrange_type_name ':' subrange_spec_init */
   299   if (typeid(*type_decl) == typeid(subrange_spec_init_c))            {return true;}   /* subrange_specification ASSIGN signed_integer */
   299   if (typeid(*type_decl) == typeid(subrange_spec_init_c))            {return true;}   /* subrange_specification ASSIGN signed_integer */
   300   if (typeid(*type_decl) == typeid(subrange_specification_c))        {return true;}   /*  integer_type_name '(' subrange')' */
   300   if (typeid(*type_decl) == typeid(subrange_specification_c))        {return true;}   /*  integer_type_name '(' subrange')' */