diff options
author | Christian <c@ethdev.com> | 2015-01-14 01:12:19 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-14 01:12:30 +0800 |
commit | b440d7e321793e0b053d3b467934a45f880863e0 (patch) | |
tree | 9144aea74cfd5c67188bd9a75ba9fb1673c0e0b1 /AST.h | |
parent | ec022783c4ba2a319ce60dc818e4f0e0e8872093 (diff) | |
download | dexon-solidity-b440d7e321793e0b053d3b467934a45f880863e0.tar.gz dexon-solidity-b440d7e321793e0b053d3b467934a45f880863e0.tar.zst dexon-solidity-b440d7e321793e0b053d3b467934a45f880863e0.zip |
Specify value for contract creation.
Diffstat (limited to 'AST.h')
-rwxr-xr-x | AST.h | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -790,26 +790,22 @@ private: }; /** - * Expression that creates a new contract, e.g. "new SomeContract(1, 2)". + * Expression that creates a new contract, e.g. the "new SomeContract" part in "new SomeContract(1, 2)". */ class NewExpression: public Expression { public: - NewExpression(Location const& _location, ASTPointer<Identifier> const& _contractName, - std::vector<ASTPointer<Expression>> const& _arguments): - Expression(_location), m_contractName(_contractName), m_arguments(_arguments) {} + NewExpression(Location const& _location, ASTPointer<Identifier> const& _contractName): + Expression(_location), m_contractName(_contractName) {} virtual void accept(ASTVisitor& _visitor) override; virtual void accept(ASTConstVisitor& _visitor) const override; virtual void checkTypeRequirements() override; - 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 { solAssert(m_contract, ""); return m_contract; } private: ASTPointer<Identifier> m_contractName; - std::vector<ASTPointer<Expression>> m_arguments; ContractDefinition const* m_contract = nullptr; }; |