aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-05-22 20:33:46 +0800
committerGitHub <noreply@github.com>2017-05-22 20:33:46 +0800
commit8eead553aff1ec30c3d1b15ae9b2929b887ede49 (patch)
treea9eba765277360c579ee89ee78d9606c17cb9ffa /libsolidity/ast/AST.h
parente3af064098edae79aa3bbfb2a96b43fa3479269d (diff)
parente82df073d15237455b1e53e35ef544aea72a69f9 (diff)
downloaddexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar.gz
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar.bz2
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar.lz
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar.xz
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.tar.zst
dexon-solidity-8eead553aff1ec30c3d1b15ae9b2929b887ede49.zip
Merge pull request #1810 from ethereum/compactJson
Compact format for AST-Json.
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 02234ffc..71b81a69 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -583,8 +583,7 @@ public:
bool isPayable() const { return m_isPayable; }
std::vector<ASTPointer<ModifierInvocation>> const& modifiers() const { return m_functionModifiers; }
std::vector<ASTPointer<VariableDeclaration>> const& returnParameters() const { return m_returnParameters->parameters(); }
- Block const& body() const { return *m_body; }
-
+ Block const& body() const { solAssert(m_body, ""); return *m_body; }
virtual bool isVisibleInContract() const override
{
return Declaration::isVisibleInContract() && !isConstructor() && !name().empty();
@@ -1314,7 +1313,7 @@ private:
/**
* Tuple, parenthesized expression, or bracketed expression.
- * Examples: (1, 2), (x,), (x), (), [1, 2],
+ * Examples: (1, 2), (x,), (x), (), [1, 2],
* Individual components might be empty shared pointers (as in the second example).
* The respective types in lvalue context are: 2-tuple, 2-tuple (with wildcard), type of x, 0-tuple
* Not in lvalue context: 2-tuple, _1_-tuple, type of x, 0-tuple.
@@ -1327,8 +1326,8 @@ public:
std::vector<ASTPointer<Expression>> const& _components,
bool _isArray
):
- Expression(_location),
- m_components(_components),
+ Expression(_location),
+ m_components(_components),
m_isArray(_isArray) {}
virtual void accept(ASTVisitor& _visitor) override;
virtual void accept(ASTConstVisitor& _visitor) const override;