[ozulis] fixing some memory leaks
[ozulis.git] / src / ozulis / ast / scope.hh
blob92b21f2e40a8d69c64f09206b494b6170240ed4d
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();
16 ~Scope();
18 bool addSymbol(SymbolPtr symbol);
19 SymbolPtr findSymbol(const std::string & name) const;
20 std::string nextId();
21 std::string nextStringId();
23 std::string prefix;
24 Scope * parent;
26 protected:
27 typedef std::map<std::string, SymbolPtr> symbols_t;
28 symbols_t symbols_;
29 int32_t nextId_;
34 extern template class std::map<std::string, ozulis::ast::SymbolPtr>;
36 #endif /* !SCOPE_HH */