aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-11-16 01:20:49 +0800
committerGitHub <noreply@github.com>2017-11-16 01:20:49 +0800
commitf2e9dea5e7662d46702a200e66f554d40a1821e0 (patch)
tree87df6a06da0ed775defe6b1b2954765753bd4681
parent5e55b27e2881c3abaaae8a4f6f7691155b56876a (diff)
parent02db1ad5849cc98c3f8f5af0de3a7f62c080026e (diff)
downloaddexon-solidity-f2e9dea5e7662d46702a200e66f554d40a1821e0.tar.gz
dexon-solidity-f2e9dea5e7662d46702a200e66f554d40a1821e0.tar.zst
dexon-solidity-f2e9dea5e7662d46702a200e66f554d40a1821e0.zip
Merge pull request #3194 from kseo/print-using-for
Print using for directive in ASTPrinter
-rw-r--r--libsolidity/ast/ASTPrinter.cpp12
-rw-r--r--libsolidity/ast/ASTPrinter.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/libsolidity/ast/ASTPrinter.cpp b/libsolidity/ast/ASTPrinter.cpp
index 81e6cc44..23c3cbe1 100644
--- a/libsolidity/ast/ASTPrinter.cpp
+++ b/libsolidity/ast/ASTPrinter.cpp
@@ -78,6 +78,13 @@ bool ASTPrinter::visit(InheritanceSpecifier const& _node)
return goDeeper();
}
+bool ASTPrinter::visit(UsingForDirective const& _node)
+{
+ writeLine("UsingForDirective");
+ printSourcePart(_node);
+ return goDeeper();
+}
+
bool ASTPrinter::visit(StructDefinition const& _node)
{
writeLine("StructDefinition \"" + _node.name() + "\"");
@@ -385,6 +392,11 @@ void ASTPrinter::endVisit(InheritanceSpecifier const&)
m_indentation--;
}
+void ASTPrinter::endVisit(UsingForDirective const&)
+{
+ m_indentation--;
+}
+
void ASTPrinter::endVisit(StructDefinition const&)
{
m_indentation--;
diff --git a/libsolidity/ast/ASTPrinter.h b/libsolidity/ast/ASTPrinter.h
index d6897dfd..01e4f7fc 100644
--- a/libsolidity/ast/ASTPrinter.h
+++ b/libsolidity/ast/ASTPrinter.h
@@ -51,6 +51,7 @@ public:
bool visit(ImportDirective const& _node) override;
bool visit(ContractDefinition const& _node) override;
bool visit(InheritanceSpecifier const& _node) override;
+ bool visit(UsingForDirective const& _node) override;
bool visit(StructDefinition const& _node) override;
bool visit(EnumDefinition const& _node) override;
bool visit(EnumValue const& _node) override;
@@ -94,6 +95,7 @@ public:
void endVisit(ImportDirective const&) override;
void endVisit(ContractDefinition const&) override;
void endVisit(InheritanceSpecifier const&) override;
+ void endVisit(UsingForDirective const&) override;
void endVisit(StructDefinition const&) override;
void endVisit(EnumDefinition const&) override;
void endVisit(EnumValue const&) override;