21 for(std::size_t i=0; i<sub.size(); i++)
30 if(sub[base].
id()==ID_name)
31 return sub[base].get(ID_identifier);
32 else if(base+1<sub.size() && sub[base].id()==ID_operator)
33 return "operator"+sub[base+1].id_string();
34 else if(base+1<sub.size() && sub[base].id()==
"~" && sub[base+1].id()==ID_name)
35 return "~"+sub[base+1].get_string(ID_identifier);
42 std::string &identifier,
43 std::string &base_name)
const
45 for(
const auto &irep :
get_sub())
49 std::string name_component;
52 name_component = irep.get_string(ID_identifier);
53 else if(
id==ID_template_args)
56 ss << location() <<
'\n';
57 ss <<
"no template arguments allowed here";
61 name_component = irep.id_string();
63 identifier+=name_component;
68 base_name+=name_component;
77 for(
const auto &irep :
get_sub())
80 str += irep.id_string();
81 else if(irep.id() == ID_template_args)
84 str += irep.get_string(ID_identifier);
static bool convert(const irep_idt &identifier, const std::ostringstream &s, symbol_table_baset &symbol_table, message_handlert &message_handler)
irep_idt get_base_name() const
std::string to_string() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.