diff trunk/src/dil/Types.d @ 495:b60450804b6e

Attributes are evaluated during the parsing phase now. Renamed parseDeclarationDefinitionsBlock to parseDeclarationDefinitionsBody. Renamed parseDeclaration to parseVariableOrFunction. Removed class Linkage, renamed parseLinkage to parseLinkageType and modified it so that it returns a value from enum LinkageType. Fix in parseStorageAttribute(): class invariants are recognized now. Modified parseAlignAttribute() so that returns an uint - the alignment size. Removed classes AttributeStatement and ExternStatement. Using Declarations instead in parseAttributeStatement(). Added LinkageType to module Enums. Added StorageClassDeclaration and renamed ExternDeclaration to LinkageDeclaration.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 08 Dec 2007 22:20:34 +0100
parents 9c208925a3d4
children 3bb94ba21490
line wrap: on
line diff
--- a/trunk/src/dil/Types.d	Fri Dec 07 18:22:35 2007 +0100
+++ b/trunk/src/dil/Types.d	Sat Dec 08 22:20:34 2007 +0100
@@ -8,48 +8,6 @@
 import dil.Expressions;
 import dil.Enums;
 
-class Linkage : Node
-{
-  enum Type
-  {
-    Extern,
-    C,
-    Cpp,
-    D,
-    Windows,
-    Pascal,
-    System
-  }
-
-  /++
-    This enum is used by the parser to find redundant
-    or conflicting extern attribute declarations.
-  +/
-  enum Category
-  {
-    Unset,
-    ExternSymbol = 1<<1, /// Extern
-    MangleSymbol = 1<<2  /// C, Cpp, D, Windows, Pascal, System
-  }
-
-  Linkage.Type type;
-
-  this(typeof(type) type)
-  {
-    super(NodeCategory.Other);
-    mixin(set_kind);
-    this.type = type;
-  }
-
-  static Category getCategory(Linkage linkage)
-  {
-    if (linkage is null)
-      return Category.ExternSymbol;
-    else
-      return Category.MangleSymbol;
-  }
-}
-
 class Parameter : Node
 {
   StorageClass stc;