aboutsummaryrefslogtreecommitdiffstats
path: root/AST.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-06 08:06:24 +0800
committerChristian <c@ethdev.com>2014-12-08 19:49:03 +0800
commitc78c330634997e5d8e2ec27db9e3d9cf50bae230 (patch)
treeb47e89a21d6686ca49478528ace3e239836dbb0e /AST.h
parent41b8d7b7f1221c6caae142a6833228ccd098ef5b (diff)
downloaddexon-solidity-c78c330634997e5d8e2ec27db9e3d9cf50bae230.tar.gz
dexon-solidity-c78c330634997e5d8e2ec27db9e3d9cf50bae230.tar.zst
dexon-solidity-c78c330634997e5d8e2ec27db9e3d9cf50bae230.zip
Const AST visitor for the compiler.
Diffstat (limited to 'AST.h')
-rw-r--r--AST.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/AST.h b/AST.h
index e1044618..966acb97 100644
--- a/AST.h
+++ b/AST.h
@@ -245,10 +245,10 @@ public:
bool isPublic() const { return m_isPublic; }
bool isDeclaredConst() const { return m_isDeclaredConst; }
std::vector<ASTPointer<VariableDeclaration>> const& getParameters() const { return m_parameters->getParameters(); }
- ParameterList& getParameterList() { return *m_parameters; }
+ ParameterList const& getParameterList() const { return *m_parameters; }
std::vector<ASTPointer<VariableDeclaration>> const& getReturnParameters() const { return m_returnParameters->getParameters(); }
ASTPointer<ParameterList> const& getReturnParameterList() const { return m_returnParameters; }
- Block& getBody() { return *m_body; }
+ Block const& getBody() const { return *m_body; }
/// @return A shared pointer of an ASTString.
/// Can contain a nullptr in which case indicates absence of documentation
ASTPointer<ASTString> const& getDocumentation() const { return m_documentation; }
@@ -796,7 +796,7 @@ public:
ASTString const& getName() const { return *m_name; }
void setReferencedDeclaration(Declaration& _referencedDeclaration) { m_referencedDeclaration = &_referencedDeclaration; }
- Declaration* getReferencedDeclaration() { return m_referencedDeclaration; }
+ Declaration const* getReferencedDeclaration() const { return m_referencedDeclaration; }
private:
ASTPointer<ASTString> m_name;