Nicolas Winkler 7 年之前
父節點
當前提交
70da87e816
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/Semantic.h

+ 8 - 2
src/Semantic.h

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