diff options
author | Christian <c@ethdev.com> | 2015-01-16 03:04:06 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-20 06:35:04 +0800 |
commit | 914fcedd0e2217300ee28f13bc4c006860f81a12 (patch) | |
tree | a0536dbf1e36ac7ce96ca68febda501915f9c973 /AST.h | |
parent | 4631e54e08184df7b6788f37b0ad2f808d1d73cc (diff) | |
download | dexon-solidity-914fcedd0e2217300ee28f13bc4c006860f81a12.tar.gz dexon-solidity-914fcedd0e2217300ee28f13bc4c006860f81a12.tar.zst dexon-solidity-914fcedd0e2217300ee28f13bc4c006860f81a12.zip |
Import inherited members into the contract's scope.
Diffstat (limited to 'AST.h')
-rwxr-xr-x | AST.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -173,6 +173,7 @@ public: virtual void accept(ASTVisitor& _visitor) override; virtual void accept(ASTConstVisitor& _visitor) const override; + std::vector<ASTPointer<Identifier>> const& getBaseContracts() const { return m_baseContracts; } std::vector<ASTPointer<StructDefinition>> const& getDefinedStructs() const { return m_definedStructs; } std::vector<ASTPointer<VariableDeclaration>> const& getStateVariables() const { return m_stateVariables; } std::vector<ASTPointer<FunctionDefinition>> const& getDefinedFunctions() const { return m_definedFunctions; } @@ -189,6 +190,11 @@ public: /// as intended for use by the ABI. std::map<FixedHash<4>, FunctionDefinition const*> getInterfaceFunctions() const; + /// List of all (direct and indirect) base contracts in order from derived to base, including + /// the contract itself. Available after name resolution + std::vector<ContractDefinition const*> const& getLinearizedBaseContracts() const { return m_linearizedBaseContracts; } + void setLinearizedBaseContracts(std::vector<ContractDefinition const*> const& _bases) { m_linearizedBaseContracts = _bases; } + /// Returns the constructor or nullptr if no constructor was specified FunctionDefinition const* getConstructor() const; @@ -200,6 +206,8 @@ private: std::vector<ASTPointer<VariableDeclaration>> m_stateVariables; std::vector<ASTPointer<FunctionDefinition>> m_definedFunctions; ASTPointer<ASTString> m_documentation; + + std::vector<ContractDefinition const*> m_linearizedBaseContracts; }; class StructDefinition: public Declaration |