QlowB 6 years ago
parent
commit
b8d58c7192
1 changed files with 11 additions and 3 deletions
  1. 11 3
      src/Type.h

+ 11 - 3
src/Type.h

@@ -13,15 +13,17 @@ namespace qlow
 {
 {
     namespace sem
     namespace sem
     {
     {
-        struct SemanticObject;
-        
         // forward declarations
         // forward declarations
         struct Class;
         struct Class;
+        
+        class Scope;
     }
     }
 
 
 
 
     namespace sem
     namespace sem
     {
     {
+        struct SemanticObject;
+        
         class Type;
         class Type;
         
         
         class ClassType;
         class ClassType;
@@ -52,7 +54,7 @@ public:
     virtual bool isNativeType(void) const = 0;
     virtual bool isNativeType(void) const = 0;
     virtual bool isArrayType(void) const = 0;
     virtual bool isArrayType(void) const = 0;
 
 
-    virtual Scope& getScope(void);
+    virtual Scope& getScope(void) = 0;
     
     
     virtual llvm::Type* getLlvmType(llvm::LLVMContext& context) const = 0;
     virtual llvm::Type* getLlvmType(llvm::LLVMContext& context) const = 0;
     
     
@@ -77,6 +79,8 @@ public:
     inline bool isNativeType(void) const override { return false; }
     inline bool isNativeType(void) const override { return false; }
     inline bool isArrayType(void) const override { return false; }
     inline bool isArrayType(void) const override { return false; }
     
     
+    Scope& getScope(void);
+    
     virtual llvm::Type* getLlvmType(llvm::LLVMContext& context) const override;
     virtual llvm::Type* getLlvmType(llvm::LLVMContext& context) const override;
     inline sem::Class* getClassType(void) { return classType; }
     inline sem::Class* getClassType(void) { return classType; }
     virtual bool equals(const Type* other) const;
     virtual bool equals(const Type* other) const;
@@ -97,6 +101,8 @@ public:
     inline bool isNativeType(void) const override { return false; }
     inline bool isNativeType(void) const override { return false; }
     inline bool isArrayType(void) const override { return true; }
     inline bool isArrayType(void) const override { return true; }
     
     
+    Scope& getScope(void);
+    
     virtual llvm::Type* getLlvmType(llvm::LLVMContext& context) const override;
     virtual llvm::Type* getLlvmType(llvm::LLVMContext& context) const override;
     inline sem::Type* getArrayType(void) { return arrayType; }
     inline sem::Type* getArrayType(void) { return arrayType; }
     virtual bool equals(const Type* other) const;
     virtual bool equals(const Type* other) const;
@@ -128,6 +134,8 @@ public:
     inline bool isNativeType(void) const override { return true; }
     inline bool isNativeType(void) const override { return true; }
     inline bool isArrayType(void) const override { return false; }
     inline bool isArrayType(void) const override { return false; }
     
     
+    Scope& getScope(void);
+    
     bool isIntegerType(void) const;
     bool isIntegerType(void) const;
     
     
     llvm::Type* getLlvmType(llvm::LLVMContext& context) const override;
     llvm::Type* getLlvmType(llvm::LLVMContext& context) const override;