data: cleaned up TokenLocation classes

* removed self assiged locationId
* show errors after parse again
This commit is contained in:
Eberhard Graether
2015-08-27 22:14:12 +02:00
parent 2044ff9723
commit 9bcf7d2f0f
14 changed files with 54 additions and 137 deletions
-13
View File
@@ -2,17 +2,6 @@
#include "data/location/TokenLocationLine.h"
TokenLocation::TokenLocation(Id tokenId, TokenLocationLine* line, unsigned int columnNumber, bool isStart)
: m_id(s_locationId++)
, m_tokenId(tokenId)
, m_type(LOCATION_TOKEN)
, m_line(line)
, m_columnNumber(columnNumber)
, m_other(nullptr)
, m_isStart(isStart)
{
}
TokenLocation::TokenLocation(Id locationId, Id tokenId, TokenLocationLine* line, unsigned int columnNumber, bool isStart)
: m_id(locationId)
, m_tokenId(tokenId)
@@ -193,8 +182,6 @@ bool TokenLocation::isScopeTokenLocation() const
return m_type == LOCATION_SCOPE;
}
Id TokenLocation::s_locationId = 1;
std::ostream& operator<<(std::ostream& ostream, const TokenLocation& location)
{
if ((&location)->isStartTokenLocation())