Parse @ast-id annotation.

This commit is contained in:
chriseth
2021-09-16 17:18:48 +02:00
parent 42739b73b1
commit 05d20446bb
4 changed files with 107 additions and 9 deletions
+13 -5
View File
@@ -38,14 +38,22 @@ using Type = YulString;
struct DebugData
{
explicit DebugData(langutil::SourceLocation _location): location(std::move(_location)) {}
explicit DebugData(langutil::SourceLocation _location, std::optional<int64_t> _astID = {}):
location(std::move(_location)),
astID(std::move(_astID))
{}
static std::shared_ptr<DebugData const> create(
langutil::SourceLocation _location = {},
std::optional<int64_t> _astID = {}
)
{
return std::make_shared<DebugData const>(std::move(_location), std::move(_astID));
}
langutil::SourceLocation location;
/// ID in the (Solidity) source AST.
std::optional<int64_t> astID;
static std::shared_ptr<DebugData const> create(langutil::SourceLocation _location = {})
{
return std::make_shared<DebugData const>(_location);
}
};
struct TypedName { std::shared_ptr<DebugData const> debugData; YulString name; Type type; };