1 // =================================
 2 // Copyright (c) 2020 Seppo Laakko
 3 // Distributed under the MIT license
 4 // =================================
 5 
 6 #ifndef CPP2CM_CPP2CM_CONTEXT_INCLUDED
 7 #define CPP2CM_CPP2CM_CONTEXT_INCLUDED
 8 #include <sngcpp/symbols/Symbol.hpp>
 9 #include <sngcm/ast/Namespace.hpp>
10 #include <unordered_map>
11 #include <set>
12 #include <string>
13 
14 namespace cpp2cm {
15 
16 struct Context 
17 {
18     Context();
19     std::unordered_map<std::u32stringsngcm::ast::NamespaceNode*> nsmap;
20     std::unordered_map<sngcpp::symbols::Symbol*sngcm::ast::Node*> containerMap;
21     std::set<std::u32string> namespaceImports;
22     sngcm::ast::Node* currentContainerNode;
23     sngcm::ast::NamespaceNode* currentNamespace;
24     sngcpp::symbols::ClassTypeSymbol* currentClassTypeSymbol;
25 };
26 
27 } // namespace cpp2cm
28 
29 #endif // CPP2CM_CPP2CM_CONTEXT_INCLUDED