aboutsummaryrefslogtreecommitdiffstats
path: root/ASTPrinter.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-10-16 20:08:54 +0800
committerChristian <c@ethdev.com>2014-10-16 20:08:54 +0800
commit8a506b505f4725e8a76bbad8399562099e4510c3 (patch)
treedf14374ccbe42eef8ccb162b15c6742b4a662e9b /ASTPrinter.h
parent4ece1ba1d327175aa7cad9a01ee35b0de2eb861b (diff)
downloaddexon-solidity-8a506b505f4725e8a76bbad8399562099e4510c3.tar
dexon-solidity-8a506b505f4725e8a76bbad8399562099e4510c3.tar.gz
dexon-solidity-8a506b505f4725e8a76bbad8399562099e4510c3.tar.bz2
dexon-solidity-8a506b505f4725e8a76bbad8399562099e4510c3.tar.lz
dexon-solidity-8a506b505f4725e8a76bbad8399562099e4510c3.tar.xz
dexon-solidity-8a506b505f4725e8a76bbad8399562099e4510c3.tar.zst
dexon-solidity-8a506b505f4725e8a76bbad8399562099e4510c3.zip
Corrected coding style.
Diffstat (limited to 'ASTPrinter.h')
-rw-r--r--ASTPrinter.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/ASTPrinter.h b/ASTPrinter.h
index 6a864f38..52f34991 100644
--- a/ASTPrinter.h
+++ b/ASTPrinter.h
@@ -1,18 +1,18 @@
/*
- This file is part of cpp-ethereum.
+ This file is part of cpp-ethereum.
- cpp-ethereum is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
+ cpp-ethereum is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- cpp-ethereum is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ cpp-ethereum is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License
+ along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @author Christian <c@ethdev.com>
@@ -25,8 +25,10 @@
#include <ostream>
#include <libsolidity/ASTVisitor.h>
-namespace dev {
-namespace solidity {
+namespace dev
+{
+namespace solidity
+{
class ASTPrinter : public ASTVisitor
{
@@ -67,7 +69,7 @@ public:
bool visit(ElementaryTypeNameExpression& _node) override;
bool visit(Literal& _node) override;
- void endVisit(ASTNode & _node) override;
+ void endVisit(ASTNode& _node) override;
void endVisit(ContractDefinition&) override;
void endVisit(StructDefinition&) override;
void endVisit(ParameterList&) override;
@@ -103,10 +105,12 @@ private:
std::string getIndentation() const;
void writeLine(std::string const& _line);
bool goDeeper() { m_indentation++; return true; }
+
int m_indentation;
std::string m_source;
ptr<ASTNode> m_ast;
std::ostream* m_ostream;
};
-} }
+}
+}