[ozulis] custom memory management is near completion, but i still have a bug :/
[ozulis.git] / src / ozulis / ast / scope.hh
bloba78e7f711d9603799364edb99e73ae8f5c8c7ff9
1 #ifndef SCOPE_HH
2 # define SCOPE_HH
4 # include <map>
6 # include "ast.hh"
8 namespace ozulis
10 namespace ast
12 class Scope
14 public:
15 Scope();
17 bool addSymbol(SymbolPtr symbol);
18 SymbolPtr findSymbol(const std::string & name) const;
19 std::string nextId();
20 std::string nextStringId();
22 std::string prefix;
23 Scope * parent;
25 protected:
26 typedef std::map<std::string, SymbolPtr> symbols_t;
27 symbols_t symbols_;
28 int32_t nextId_;
33 extern template class std::map<std::string, ozulis::ast::SymbolPtr>;
35 #endif /* !SCOPE_HH */