comparison dmd/enum.h @ 1587:def7a1d494fd

Merge DMD 1.051
author Christian Kamm <kamm incasoftware de>
date Fri, 06 Nov 2009 23:58:01 +0100
parents e961851fb8be
children 6c36e3f49b28
comparison
equal deleted inserted replaced
1586:7f728c52e63c 1587:def7a1d494fd
25 struct HdrGenState; 25 struct HdrGenState;
26 #endif 26 #endif
27 27
28 28
29 struct EnumDeclaration : ScopeDsymbol 29 struct EnumDeclaration : ScopeDsymbol
30 { 30 { /* enum ident : memtype { ... }
31 */
31 Type *type; // the TypeEnum 32 Type *type; // the TypeEnum
32 Type *memtype; // type of the members 33 Type *memtype; // type of the members
33 34
34 #if DMDV1 35 #if DMDV1
35 dinteger_t maxval; 36 dinteger_t maxval;
37 dinteger_t defaultval; // default initializer 38 dinteger_t defaultval; // default initializer
38 #else 39 #else
39 Expression *maxval; 40 Expression *maxval;
40 Expression *minval; 41 Expression *minval;
41 Expression *defaultval; // default initializer 42 Expression *defaultval; // default initializer
42
43 Scope *scope; // !=NULL means context to use
44 #endif 43 #endif
45 int isdeprecated; 44 int isdeprecated;
46 45
47 EnumDeclaration(Loc loc, Identifier *id, Type *memtype); 46 EnumDeclaration(Loc loc, Identifier *id, Type *memtype);
48 Dsymbol *syntaxCopy(Dsymbol *s); 47 Dsymbol *syntaxCopy(Dsymbol *s);
55 Dsymbol *search(Loc, Identifier *ident, int flags); 54 Dsymbol *search(Loc, Identifier *ident, int flags);
56 #endif 55 #endif
57 int isDeprecated(); // is Dsymbol deprecated? 56 int isDeprecated(); // is Dsymbol deprecated?
58 57
59 void emitComment(Scope *sc); 58 void emitComment(Scope *sc);
59 void toJsonBuffer(OutBuffer *buf);
60 void toDocBuffer(OutBuffer *buf); 60 void toDocBuffer(OutBuffer *buf);
61 61
62 EnumDeclaration *isEnumDeclaration() { return this; } 62 EnumDeclaration *isEnumDeclaration() { return this; }
63 63
64 #if IN_DMD 64 #if IN_DMD
84 Dsymbol *syntaxCopy(Dsymbol *s); 84 Dsymbol *syntaxCopy(Dsymbol *s);
85 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); 85 void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
86 const char *kind(); 86 const char *kind();
87 87
88 void emitComment(Scope *sc); 88 void emitComment(Scope *sc);
89 void toJsonBuffer(OutBuffer *buf);
89 void toDocBuffer(OutBuffer *buf); 90 void toDocBuffer(OutBuffer *buf);
90 91
91 EnumMember *isEnumMember() { return this; } 92 EnumMember *isEnumMember() { return this; }
92 }; 93 };
93 94