aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/ast/AST.h
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-14 08:48:40 +0800
committerchriseth <chris@ethereum.org>2018-02-27 19:17:25 +0800
commit6b9dda06f3d85344a70efb2f868760a0dde9dc45 (patch)
tree860f6e2c040387261969907fc1214b6aa9bc234d /libsolidity/ast/AST.h
parente227bdbfa7157d2675c177c75d44e13f0bd82214 (diff)
downloaddexon-solidity-6b9dda06f3d85344a70efb2f868760a0dde9dc45.tar.gz
dexon-solidity-6b9dda06f3d85344a70efb2f868760a0dde9dc45.tar.zst
dexon-solidity-6b9dda06f3d85344a70efb2f868760a0dde9dc45.zip
Enable C99-scoping with the 0.5.0-experimental pragma.
Diffstat (limited to 'libsolidity/ast/AST.h')
-rw-r--r--libsolidity/ast/AST.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h
index 1e4c6591..863ad2fe 100644
--- a/libsolidity/ast/AST.h
+++ b/libsolidity/ast/AST.h
@@ -151,6 +151,13 @@ public:
ASTNode const* scope() const { return m_scope; }
void setScope(ASTNode const* _scope) { m_scope = _scope; }
+ /// @returns the source unit this scopable is present in.
+ SourceUnit const& sourceUnit() const;
+
+ /// @returns the source name this scopable is present in.
+ /// Can be combined with annotation().canonicalName (if present) to form a globally unique name.
+ std::string sourceUnitName() const;
+
protected:
ASTNode const* m_scope = nullptr;
};
@@ -197,12 +204,6 @@ public:
virtual bool isVisibleInContract() const { return visibility() != Visibility::External; }
bool isVisibleInDerivedContracts() const { return isVisibleInContract() && visibility() >= Visibility::Internal; }
- /// @returns the source unit this declaration is present in.
- SourceUnit const& sourceUnit() const;
-
- /// @returns the source name this declaration is present in.
- /// Can be combined with annotation().canonicalName to form a globally unique name.
- std::string sourceUnitName() const;
std::string fullyQualifiedName() const { return sourceUnitName() + ":" + name(); }
virtual bool isLValue() const { return false; }