aboutsummaryrefslogtreecommitdiffstats
path: root/AST.h
diff options
context:
space:
mode:
Diffstat (limited to 'AST.h')
-rw-r--r--AST.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/AST.h b/AST.h
index ce9190ea..19328e5f 100644
--- a/AST.h
+++ b/AST.h
@@ -116,9 +116,9 @@ public:
virtual void accept(ASTVisitor& _visitor) override;
- std::vector<ASTPointer<StructDefinition>> const& getDefinedStructs() { return m_definedStructs; }
- std::vector<ASTPointer<VariableDeclaration>> const& getStateVariables() { return m_stateVariables; }
- std::vector<ASTPointer<FunctionDefinition>> const& getDefinedFunctions() { return m_definedFunctions; }
+ 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; }
private:
std::vector<ASTPointer<StructDefinition>> m_definedStructs;
@@ -135,6 +135,8 @@ public:
Declaration(_location, _name), m_members(_members) {}
virtual void accept(ASTVisitor& _visitor) override;
+ std::vector<ASTPointer<VariableDeclaration>> const& getMembers() const { return m_members; }
+
private:
std::vector<ASTPointer<VariableDeclaration>> m_members;
};