Stylistic changes.

This commit is contained in:
Christian 2014-12-16 16:15:34 +01:00
parent c40725c22a
commit 5b802b685e
3 changed files with 5 additions and 5 deletions

2
AST.h
View File

@ -763,7 +763,7 @@ public:
std::vector<ASTPointer<Expression const>> getArguments() const { return {m_arguments.begin(), m_arguments.end()}; } 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. /// 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: private:
ASTPointer<Identifier> m_contractName; ASTPointer<Identifier> m_contractName;

View File

@ -314,9 +314,9 @@ shared_ptr<FunctionType const> const& ContractType::getConstructorType() const
{ {
if (!m_constructorType) if (!m_constructorType)
{ {
FunctionDefinition const* constr = m_contract.getConstructor(); FunctionDefinition const* constructor = m_contract.getConstructor();
if (constr) if (constructor)
m_constructorType = make_shared<FunctionType const>(*constr); m_constructorType = make_shared<FunctionType const>(*constructor);
else else
m_constructorType = make_shared<FunctionType const>(TypePointers(), TypePointers()); m_constructorType = make_shared<FunctionType const>(TypePointers(), TypePointers());
} }

View File

@ -29,7 +29,7 @@ Expression = Assignment | UnaryOperation | BinaryOperation | FunctionCall | NewE
MemberAccess | PrimaryExpression MemberAccess | PrimaryExpression
// The expression syntax is actually much more complicated // The expression syntax is actually much more complicated
Assignment = Expression (AssignmentOp Expression) Assignment = Expression (AssignmentOp Expression)
FunctionCall = Expression '(' ( Expression ( ',' Expression )* ) ')' FunctionCall = Expression '(' Expression ( ',' Expression )* ')'
NewExpression = 'new' Identifier '(' ( Expression ( ',' Expression )* ) ')' NewExpression = 'new' Identifier '(' ( Expression ( ',' Expression )* ) ')'
MemberAccess = Expression '.' Identifier MemberAccess = Expression '.' Identifier
IndexAccess = Expression '[' Expresison ']' IndexAccess = Expression '[' Expresison ']'