comparison dmd/UnionDeclaration.d @ 23:460959608115

Branch merge.
author Robert Clipsham <robert@octarineparrot.com>
date Mon, 12 Apr 2010 17:00:08 +0100
parents 427f8aa74d28 f2413c9183d1
children 2e2a5c3f943a
comparison
equal deleted inserted replaced
13:427f8aa74d28 23:460959608115
5 import dmd.Identifier; 5 import dmd.Identifier;
6 import dmd.Dsymbol; 6 import dmd.Dsymbol;
7 7
8 class UnionDeclaration : StructDeclaration 8 class UnionDeclaration : StructDeclaration
9 { 9 {
10 this(Loc loc, Identifier id) 10 this(Loc loc, Identifier id)
11 { 11 {
12 super(loc, id); 12 super(loc, id);
13 } 13 }
14 14
15 Dsymbol syntaxCopy(Dsymbol s) 15 Dsymbol syntaxCopy(Dsymbol s)
16 { 16 {
17 assert(false); 17 UnionDeclaration ud;
18 } 18
19 19 if (s)
20 string kind() 20 ud = cast(UnionDeclaration)s;
21 { 21 else
22 assert(false); 22 ud = new UnionDeclaration(loc, ident);
23 StructDeclaration.syntaxCopy(ud);
24 return ud;
23 } 25 }
24 26
25 UnionDeclaration isUnionDeclaration() { return this; } 27 string kind()
28 {
29 return "union";
30 }
31
32 UnionDeclaration isUnionDeclaration() { return this; }
26 } 33 }