Refactoring yul source locations.

This commit is contained in:
Djordje Mijovic
2021-05-04 16:05:23 +02:00
parent fe4822a1d2
commit e404b6e7a6
62 changed files with 394 additions and 358 deletions
+3 -3
View File
@@ -53,7 +53,7 @@ bool ScopeFiller::operator()(ExpressionStatement const& _expr)
bool ScopeFiller::operator()(VariableDeclaration const& _varDecl)
{
for (auto const& variable: _varDecl.variables)
if (!registerVariable(variable, _varDecl.location, *m_currentScope))
if (!registerVariable(variable, _varDecl.debugData->location, *m_currentScope))
return false;
return true;
}
@@ -68,7 +68,7 @@ bool ScopeFiller::operator()(FunctionDefinition const& _funDef)
bool success = true;
for (auto const& var: _funDef.parameters + _funDef.returnVariables)
if (!registerVariable(var, _funDef.location, varScope))
if (!registerVariable(var, _funDef.debugData->location, varScope))
success = false;
if (!(*this)(_funDef.body))
@@ -162,7 +162,7 @@ bool ScopeFiller::registerFunction(FunctionDefinition const& _funDef)
//@TODO secondary location
m_errorReporter.declarationError(
6052_error,
_funDef.location,
_funDef.debugData->location,
"Function name " + _funDef.name.str() + " already taken in this scope."
);
return false;