Fill out originLocation with nativeLocation when importing Yul AST

This commit is contained in:
Kamil Śliwak
2021-09-22 13:17:18 +02:00
parent d23754eafd
commit fc7e8c56dc
3 changed files with 18 additions and 4 deletions
+4 -1
View File
@@ -55,7 +55,10 @@ T AsmJsonImporter::createAsmNode(Json::Value const& _node)
T r;
SourceLocation nativeLocation = createSourceLocation(_node);
yulAssert(nativeLocation.hasText(), "Invalid source location in Asm AST");
r.debugData = DebugData::create(nativeLocation);
// TODO: We should add originLocation to the AST.
// While it's not included, we'll use nativeLocation for it because we only support importing
// inline assembly as a part of a Solidity AST and there these locations are always the same.
r.debugData = DebugData::create(nativeLocation, nativeLocation);
return r;
}