[svn r357] Merged DMD 1.033

This commit is contained in:
Tomas Lindquist Olsen
2008-07-12 19:38:31 +02:00
parent fc6e0cfc65
commit 832504e5d7
59 changed files with 18354 additions and 16980 deletions

View File

@@ -1,5 +1,5 @@
// Copyright (c) 1999-2006 by Digital Mars
// Copyright (c) 1999-2008 by Digital Mars
// All Rights Reserved
// written by Walter Bright
// http://www.digitalmars.com
@@ -14,6 +14,7 @@
#include "enum.h"
#include "mtype.h"
#include "scope.h"
#include "declaration.h"
/********************************* EnumDeclaration ****************************/
@@ -27,6 +28,7 @@ EnumDeclaration::EnumDeclaration(Loc loc, Identifier *id, Type *memtype)
minval = 0;
defaultval = 0;
sinit = NULL;
isdeprecated = 0;
}
Dsymbol *EnumDeclaration::syntaxCopy(Dsymbol *s)
@@ -57,6 +59,9 @@ void EnumDeclaration::semantic(Scope *sc)
return;
if (!memtype)
memtype = Type::tint32;
if (sc->stc & STCdeprecated)
isdeprecated = 1;
parent = sc->scopesym;
memtype = memtype->semantic(loc, sc);
@@ -265,11 +270,16 @@ Type *EnumDeclaration::getType()
return type;
}
char *EnumDeclaration::kind()
const char *EnumDeclaration::kind()
{
return "enum";
}
int EnumDeclaration::isDeprecated()
{
return isdeprecated;
}
/********************************* EnumMember ****************************/
EnumMember::EnumMember(Loc loc, Identifier *id, Expression *value)
@@ -306,7 +316,7 @@ void EnumMember::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
}
}
char *EnumMember::kind()
const char *EnumMember::kind()
{
return "enum member";
}