Separate DebugData fields for Solidity and Yul source locations

This commit is contained in:
Kamil Śliwak
2021-09-22 13:11:39 +02:00
parent 9c1d40debf
commit ce4420f857
21 changed files with 281 additions and 242 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, locationOf(_varDecl), *m_currentScope))
if (!registerVariable(variable, nativeLocationOf(_varDecl), *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, locationOf(_funDef), varScope))
if (!registerVariable(var, nativeLocationOf(_funDef), 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,
locationOf(_funDef),
nativeLocationOf(_funDef),
"Function name " + _funDef.name.str() + " already taken in this scope."
);
return false;