Nicolas Winkler 7 years ago
parent
commit
70da87e816
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/Semantic.h

+ 8 - 2
src/Semantic.h

@@ -2,6 +2,7 @@
 #define QLOW_SEMANTIC_H
 #define QLOW_SEMANTIC_H
 
 
 #include <string>
 #include <string>
+#include <map>
 #include "Util.h"
 #include "Util.h"
 
 
 namespace qlow
 namespace qlow
@@ -9,6 +10,9 @@ namespace qlow
     namespace sem
     namespace sem
     {
     {
 
 
+        template<typename T>
+        using std::map<std::string, std::unique_ptr<T>> SymbolTable;
+
         struct Class;
         struct Class;
 
 
         struct Field;
         struct Field;
@@ -20,14 +24,16 @@ namespace qlow
 struct Class
 struct Class
 {
 {
     std::string name;
     std::string name;
-    util::OwningList<Field> fields;
-    util::OwningList<Method> methods;
+    SymbolTable<Field> fields;
+    SymbolTable<Method> methods;
 };
 };
 
 
 
 
 struct Field
 struct Field
 {
 {
     Class* type;
     Class* type;
+
+
 }
 }