diff options
Diffstat (limited to 'gcc/d/dmd/enum.h')
-rw-r--r-- | gcc/d/dmd/enum.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/gcc/d/dmd/enum.h b/gcc/d/dmd/enum.h index ae5ea214a73..76c1235715b 100644 --- a/gcc/d/dmd/enum.h +++ b/gcc/d/dmd/enum.h @@ -10,15 +10,12 @@ #pragma once -#include "root/root.h" #include "dsymbol.h" #include "declaration.h" -#include "tokens.h" class Identifier; class Type; class Expression; -class VarDeclaration; class EnumDeclaration : public ScopeDsymbol { @@ -33,7 +30,7 @@ public: */ Type *type; // the TypeEnum Type *memtype; // type of the members - Prot protection; + Visibility visibility; Expression *maxval; Expression *minval; @@ -43,20 +40,18 @@ public: bool added; int inuse; - EnumDeclaration(Loc loc, Identifier *id, Type *memtype); - Dsymbol *syntaxCopy(Dsymbol *s); + EnumDeclaration *syntaxCopy(Dsymbol *s); void addMember(Scope *sc, ScopeDsymbol *sds); void setScope(Scope *sc); bool oneMember(Dsymbol **ps, Identifier *ident); Type *getType(); const char *kind() const; Dsymbol *search(const Loc &loc, Identifier *ident, int flags = SearchLocalsOnly); - bool isDeprecated(); // is Dsymbol deprecated? - Prot prot(); - Expression *getMaxMinValue(Loc loc, Identifier *id); + bool isDeprecated() const; // is Dsymbol deprecated? + Visibility visible(); bool isSpecial() const; - Expression *getDefaultValue(Loc loc); - Type *getMemtype(Loc loc); + Expression *getDefaultValue(const Loc &loc); + Type *getMemtype(const Loc &loc); EnumDeclaration *isEnumDeclaration() { return this; } @@ -83,12 +78,8 @@ public: EnumDeclaration *ed; - EnumMember(Loc loc, Identifier *id, Expression *value, Type *origType); - EnumMember(Loc loc, Identifier *id, Expression *value, Type *memType, - StorageClass stc, UserAttributeDeclaration *uad, DeprecatedDeclaration *dd); - Dsymbol *syntaxCopy(Dsymbol *s); + EnumMember *syntaxCopy(Dsymbol *s); const char *kind() const; - Expression *getVarExp(Loc loc, Scope *sc); EnumMember *isEnumMember() { return this; } void accept(Visitor *v) { v->visit(this); } |