aboutsummaryrefslogtreecommitdiffstats
path: root/AST.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-01-16 03:04:06 +0800
committerChristian <c@ethdev.com>2015-01-20 06:35:04 +0800
commit914fcedd0e2217300ee28f13bc4c006860f81a12 (patch)
treea0536dbf1e36ac7ce96ca68febda501915f9c973 /AST.h
parent4631e54e08184df7b6788f37b0ad2f808d1d73cc (diff)
downloaddexon-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-xAST.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/AST.h b/AST.h
index e4761536..b3fd840a 100755
--- a/AST.h
+++ b/AST.h
@@ -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