aboutsummaryrefslogtreecommitdiffstats
path: root/GlobalContext.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-11-22 02:14:56 +0800
committerChristian <c@ethdev.com>2014-11-24 04:28:45 +0800
commit583a315d3d282ab9fd871bb2ea3beded367be6d0 (patch)
tree8471241f34041fe5aadd7fc0a574fef8c80e2aa8 /GlobalContext.h
parentc50cd646ce3b8b6c20da747efee89f9420526cae (diff)
downloaddexon-solidity-583a315d3d282ab9fd871bb2ea3beded367be6d0.tar
dexon-solidity-583a315d3d282ab9fd871bb2ea3beded367be6d0.tar.gz
dexon-solidity-583a315d3d282ab9fd871bb2ea3beded367be6d0.tar.bz2
dexon-solidity-583a315d3d282ab9fd871bb2ea3beded367be6d0.tar.lz
dexon-solidity-583a315d3d282ab9fd871bb2ea3beded367be6d0.tar.xz
dexon-solidity-583a315d3d282ab9fd871bb2ea3beded367be6d0.tar.zst
dexon-solidity-583a315d3d282ab9fd871bb2ea3beded367be6d0.zip
Magic variables.
Diffstat (limited to 'GlobalContext.h')
-rw-r--r--GlobalContext.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/GlobalContext.h b/GlobalContext.h
index b6dea7d5..0166734c 100644
--- a/GlobalContext.h
+++ b/GlobalContext.h
@@ -24,6 +24,7 @@
#include <string>
#include <vector>
+#include <map>
#include <memory>
#include <boost/noncopyable.hpp>
#include <libsolidity/ASTForward.h>
@@ -47,14 +48,14 @@ public:
GlobalContext();
void setCurrentContract(ContractDefinition const& _contract);
+ std::vector<MagicVariableDeclaration const*> getMagicVariables() const;
std::vector<Declaration*> getDeclarations() const;
private:
- /// Creates a virtual variable declaration with the given name and type.
- static ASTPointer<VariableDeclaration> createVariable(std::string const& _name, std::shared_ptr<Type const> const& _type);
-
- std::vector<ASTPointer<Declaration>> m_objects;
- ASTPointer<Declaration> m_this;
+ MagicVariableDeclaration* getCurrentThis() const;
+ std::vector<std::shared_ptr<MagicVariableDeclaration>> m_magicVariables;
+ ContractDefinition const* m_currentContract;
+ std::map<ContractDefinition const*, std::shared_ptr<MagicVariableDeclaration>> mutable m_thisPointer;
};
}