23 for(std::size_t i=0; i<sub.size(); i++)
32 if(sub[base].
id()==ID_name)
33 return sub[base].get(ID_identifier);
34 else if(base+1<sub.size() && sub[base].id()==ID_operator)
35 return "operator"+sub[base+1].id_string();
36 else if(base+1<sub.size() && sub[base].id()==
"~" && sub[base+1].id()==ID_name)
37 return "~"+sub[base+1].get_string(ID_identifier);
44 std::string &identifier,
45 std::string &base_name)
const
47 for(
const auto &irep :
get_sub())
51 std::string name_component;
54 name_component = irep.get_string(ID_identifier);
55 else if(
id==ID_template_args)
58 ss << location() <<
'\n';
59 ss <<
"no template arguments allowed here";
63 name_component = irep.id_string();
65 identifier+=name_component;
70 base_name+=name_component;
79 for(
const auto &irep :
get_sub())
82 str += irep.id_string();
83 else if(irep.id() == ID_template_args)
86 str += irep.get_string(ID_identifier);
static bool convert(const irep_idt &identifier, const std::ostringstream &s, symbol_tablet &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.