Mercurial > projects > ldc
comparison dmd/enum.c @ 1630:44b145be2ef5
Merge dmd 1.056.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sat, 06 Feb 2010 15:53:52 +0000 |
parents | 6c36e3f49b28 |
children |
comparison
equal
deleted
inserted
replaced
1629:b07d683ba4d0 | 1630:44b145be2ef5 |
---|---|
1 | 1 |
2 // Copyright (c) 1999-2009 by Digital Mars | 2 // Copyright (c) 1999-2010 by Digital Mars |
3 // All Rights Reserved | 3 // All Rights Reserved |
4 // written by Walter Bright | 4 // written by Walter Bright |
5 // http://www.digitalmars.com | 5 // http://www.digitalmars.com |
6 // License for redistribution is by either the Artistic License | 6 // License for redistribution is by either the Artistic License |
7 // in artistic.txt, or the GNU General Public License in gnu.txt. | 7 // in artistic.txt, or the GNU General Public License in gnu.txt. |
12 | 12 |
13 #include "root.h" | 13 #include "root.h" |
14 #include "enum.h" | 14 #include "enum.h" |
15 #include "mtype.h" | 15 #include "mtype.h" |
16 #include "scope.h" | 16 #include "scope.h" |
17 #include "module.h" | |
17 #include "declaration.h" | 18 #include "declaration.h" |
18 | 19 |
19 /********************************* EnumDeclaration ****************************/ | 20 /********************************* EnumDeclaration ****************************/ |
20 | 21 |
21 EnumDeclaration::EnumDeclaration(Loc loc, Identifier *id, Type *memtype) | 22 EnumDeclaration::EnumDeclaration(Loc loc, Identifier *id, Type *memtype) |
72 { sc = scope; | 73 { sc = scope; |
73 scx = scope; // save so we don't make redundant copies | 74 scx = scope; // save so we don't make redundant copies |
74 scope = NULL; | 75 scope = NULL; |
75 } | 76 } |
76 | 77 |
78 unsigned dprogress_save = Module::dprogress; | |
79 | |
77 if (sc->stc & STCdeprecated) | 80 if (sc->stc & STCdeprecated) |
78 isdeprecated = 1; | 81 isdeprecated = 1; |
79 | 82 |
80 parent = sc->scopesym; | 83 parent = sc->scopesym; |
81 memtype = memtype->semantic(loc, sc); | 84 memtype = memtype->semantic(loc, sc); |
95 { error("base type must be of integral type, not %s", memtype->toChars()); | 98 { error("base type must be of integral type, not %s", memtype->toChars()); |
96 memtype = Type::tint32; | 99 memtype = Type::tint32; |
97 } | 100 } |
98 | 101 |
99 isdone = 1; | 102 isdone = 1; |
103 Module::dprogress++; | |
100 | 104 |
101 t = isAnonymous() ? memtype : type; | 105 t = isAnonymous() ? memtype : type; |
102 symtab = new DsymbolTable(); | 106 symtab = new DsymbolTable(); |
103 sce = sc->push(this); | 107 sce = sc->push(this); |
104 sce->parent = this; | 108 sce->parent = this; |