Location: Rewrite str and paren_str
This commit is contained in:
parent
a9a21b19e0
commit
59a80100db
@ -12,14 +12,12 @@ Location::~Location()
|
||||
|
||||
std::string Location::str() const
|
||||
{
|
||||
std::ostringstream ss;
|
||||
ss << fname << ":" << line << ":" << column;
|
||||
return ss.str();
|
||||
return format_string("%s:%d:%d", fname, line, column);
|
||||
}
|
||||
|
||||
std::string Location::paren_str() const
|
||||
{
|
||||
return format_string("(%s)", this->str());
|
||||
return format_string("(%s:%d:%d)", fname, line, column);
|
||||
}
|
||||
|
||||
void Location::advance()
|
||||
|
Loading…
Reference in New Issue
Block a user