aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-16 23:15:34 +0800
committerChristian <c@ethdev.com>2014-12-16 23:15:34 +0800
commit5b802b685e794832bf8834183bf6c9604e513bbf (patch)
treefac27ecefb32f91893f1ac685f196ae32913a551
parentc40725c22adaa2159bd06894740f7559733afbb4 (diff)
downloaddexon-solidity-5b802b685e794832bf8834183bf6c9604e513bbf.tar
dexon-solidity-5b802b685e794832bf8834183bf6c9604e513bbf.tar.gz
dexon-solidity-5b802b685e794832bf8834183bf6c9604e513bbf.tar.bz2
dexon-solidity-5b802b685e794832bf8834183bf6c9604e513bbf.tar.lz
dexon-solidity-5b802b685e794832bf8834183bf6c9604e513bbf.tar.xz
dexon-solidity-5b802b685e794832bf8834183bf6c9604e513bbf.tar.zst
dexon-solidity-5b802b685e794832bf8834183bf6c9604e513bbf.zip
Stylistic changes.
-rw-r--r--AST.h2
-rw-r--r--Types.cpp6
-rw-r--r--grammar.txt2
3 files changed, 5 insertions, 5 deletions
diff --git a/AST.h b/AST.h
index 72f96394..4bb623b4 100644
--- a/AST.h
+++ b/AST.h
@@ -763,7 +763,7 @@ public:
std::vector<ASTPointer<Expression const>> getArguments() const { return {m_arguments.begin(), m_arguments.end()}; }
/// Returns the referenced contract. Can only be called after type checking.
- ContractDefinition const* getContract() const { return m_contract; }
+ ContractDefinition const* getContract() const { if (asserts(m_contract)) BOOST_THROW_EXCEPTION(InternalCompilerError()); else return m_contract; }
private:
ASTPointer<Identifier> m_contractName;
diff --git a/Types.cpp b/Types.cpp
index f1cd7c22..eba11cb0 100644
--- a/Types.cpp
+++ b/Types.cpp
@@ -314,9 +314,9 @@ shared_ptr<FunctionType const> const& ContractType::getConstructorType() const
{
if (!m_constructorType)
{
- FunctionDefinition const* constr = m_contract.getConstructor();
- if (constr)
- m_constructorType = make_shared<FunctionType const>(*constr);
+ FunctionDefinition const* constructor = m_contract.getConstructor();
+ if (constructor)
+ m_constructorType = make_shared<FunctionType const>(*constructor);
else
m_constructorType = make_shared<FunctionType const>(TypePointers(), TypePointers());
}
diff --git a/grammar.txt b/grammar.txt
index 793e9188..a26f717a 100644
--- a/grammar.txt
+++ b/grammar.txt
@@ -29,7 +29,7 @@ Expression = Assignment | UnaryOperation | BinaryOperation | FunctionCall | NewE
MemberAccess | PrimaryExpression
// The expression syntax is actually much more complicated
Assignment = Expression (AssignmentOp Expression)
-FunctionCall = Expression '(' ( Expression ( ',' Expression )* ) ')'
+FunctionCall = Expression '(' Expression ( ',' Expression )* ')'
NewExpression = 'new' Identifier '(' ( Expression ( ',' Expression )* ) ')'
MemberAccess = Expression '.' Identifier
IndexAccess = Expression '[' Expresison ']'