src/Types.h
changeset 256 3c184218462d
parent 247 7721042bdb67
child 258 241d082d6d89
     1.1 --- a/src/Types.h	Tue Jan 01 20:08:34 2013 -0800
     1.2 +++ b/src/Types.h	Sun Jan 06 13:52:21 2013 -0800
     1.3 @@ -111,7 +111,11 @@
     1.4  
     1.5          // Structs are composite records that may contain primitives, arrays,
     1.6          // functions, enums, and other structs.
     1.7 -        STRUCT
     1.8 +        STRUCT,
     1.9 +
    1.10 +        // Importable types are mainly used during the compilation process
    1.11 +        // to distinguish between normal names and static imports.
    1.12 +        IMPORTABLE
    1.13      };
    1.14  
    1.15      void init(Kind kind, Type *root = NULL);
    1.16 @@ -127,6 +131,7 @@
    1.17      static Type *NewPrimitive(Zone *zone, PrimitiveType type);
    1.18      static Type *NewString(Zone *zone);
    1.19      static Type *NewQualified(Zone *zone, TypeQualifiers qual, Handle<Type> type);
    1.20 +    static Type *NewImportable(Zone *zone);
    1.21  
    1.22      static Type *cast(Object *obj) {
    1.23          assert(!obj ||
    1.24 @@ -160,6 +165,9 @@
    1.25      bool isStruct() {
    1.26          return kind() == STRUCT;
    1.27      }
    1.28 +    bool isImportable() {
    1.29 +        return kind() == IMPORTABLE;
    1.30 +    }
    1.31      PrimitiveType primitive() {
    1.32          assert(isPrimitive());
    1.33          return root_->primitive_;