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::string Location::str() const
|
||||||
{
|
{
|
||||||
std::ostringstream ss;
|
return format_string("%s:%d:%d", fname, line, column);
|
||||||
ss << fname << ":" << line << ":" << column;
|
|
||||||
return ss.str();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Location::paren_str() const
|
std::string Location::paren_str() const
|
||||||
{
|
{
|
||||||
return format_string("(%s)", this->str());
|
return format_string("(%s:%d:%d)", fname, line, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Location::advance()
|
void Location::advance()
|
||||||
|
Loading…
Reference in New Issue
Block a user