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
+4 -4
View File
@@ -29,17 +29,17 @@ using namespace solidity::langutil;
Literal Dialect::zeroLiteralForType(solidity::yul::YulString _type) const
{
if (_type == boolType && _type != defaultType)
return {SourceLocation{}, LiteralKind::Boolean, "false"_yulstring, _type};
return {SourceLocation{}, LiteralKind::Number, "0"_yulstring, _type};
return {DebugData::create(), LiteralKind::Boolean, "false"_yulstring, _type};
return {DebugData::create(), LiteralKind::Number, "0"_yulstring, _type};
}
Literal Dialect::trueLiteral() const
{
if (boolType != defaultType)
return {SourceLocation{}, LiteralKind::Boolean, "true"_yulstring, boolType};
return {DebugData::create(), LiteralKind::Boolean, "true"_yulstring, boolType};
else
return {SourceLocation{}, LiteralKind::Number, "1"_yulstring, defaultType};
return {DebugData::create(), LiteralKind::Number, "1"_yulstring, defaultType};
}
bool Dialect::validTypeForLiteral(LiteralKind _kind, YulString, YulString _type) const