aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/ASTJsonConverter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/ast/ASTJsonConverter.cpp')
-rw-r--r--libsolidity/ast/ASTJsonConverter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp
index 35fd0b7d..49ee6d34 100644
--- a/libsolidity/ast/ASTJsonConverter.cpp
+++ b/libsolidity/ast/ASTJsonConverter.cpp
@@ -103,6 +103,15 @@ bool ASTJsonConverter::visit(SourceUnit const&)
return true;
}
+bool ASTJsonConverter::visit(PragmaDirective const& _node)
+{
+ Json::Value literals(Json::arrayValue);
+ for (auto const& literal: _node.literals())
+ literals.append(literal);
+ addJsonNode(_node, "PragmaDirective", { make_pair("literals", literals) });
+ return true;
+}
+
bool ASTJsonConverter::visit(ImportDirective const& _node)
{
addJsonNode(_node, "ImportDirective", { make_pair("file", _node.path())});
@@ -401,6 +410,10 @@ void ASTJsonConverter::endVisit(SourceUnit const&)
goUp();
}
+void ASTJsonConverter::endVisit(PragmaDirective const&)
+{
+}
+
void ASTJsonConverter::endVisit(ImportDirective const&)
{
}