Mercurial > projects > ldc
comparison dmd2/dsymbol.h @ 1577:e4f7b5d9c68a
DMD 2.032 Merge.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Tue, 08 Sep 2009 10:07:56 +0100 |
parents | 54b3c1394d62 |
children |
comparison
equal
deleted
inserted
replaced
1576:4551475bc6b6 | 1577:e4f7b5d9c68a |
---|---|
60 struct Import; | 60 struct Import; |
61 struct Type; | 61 struct Type; |
62 struct TypeTuple; | 62 struct TypeTuple; |
63 struct WithStatement; | 63 struct WithStatement; |
64 struct LabelDsymbol; | 64 struct LabelDsymbol; |
65 struct ScopeDsymbol; | |
65 struct TemplateDeclaration; | 66 struct TemplateDeclaration; |
66 struct TemplateInstance; | 67 struct TemplateInstance; |
67 struct TemplateMixin; | 68 struct TemplateMixin; |
68 struct EnumMember; | 69 struct EnumMember; |
69 struct ScopeDsymbol; | 70 struct ScopeDsymbol; |
128 Scope *scope; // !=NULL means context to use for semantic() | 129 Scope *scope; // !=NULL means context to use for semantic() |
129 | 130 |
130 Dsymbol(); | 131 Dsymbol(); |
131 Dsymbol(Identifier *); | 132 Dsymbol(Identifier *); |
132 char *toChars(); | 133 char *toChars(); |
133 char *toPrettyChars(); | |
134 char *locToChars(); | 134 char *locToChars(); |
135 int equals(Object *o); | 135 int equals(Object *o); |
136 int isAnonymous(); | 136 int isAnonymous(); |
137 void error(Loc loc, const char *format, ...) IS_PRINTF(3); | 137 void error(Loc loc, const char *format, ...) IS_PRINTF(3); |
138 void error(const char *format, ...) IS_PRINTF(2); | 138 void error(const char *format, ...) IS_PRINTF(2); |
146 | 146 |
147 int dyncast() { return DYNCAST_DSYMBOL; } // kludge for template.isSymbol() | 147 int dyncast() { return DYNCAST_DSYMBOL; } // kludge for template.isSymbol() |
148 | 148 |
149 static Array *arraySyntaxCopy(Array *a); | 149 static Array *arraySyntaxCopy(Array *a); |
150 | 150 |
151 virtual const char *toPrettyChars(); | |
151 virtual const char *kind(); | 152 virtual const char *kind(); |
152 virtual Dsymbol *toAlias(); // resolve real symbol | 153 virtual Dsymbol *toAlias(); // resolve real symbol |
153 virtual int addMember(Scope *sc, ScopeDsymbol *s, int memnum); | 154 virtual int addMember(Scope *sc, ScopeDsymbol *s, int memnum); |
154 virtual void setScope(Scope *sc); | 155 virtual void setScope(Scope *sc); |
155 virtual void semantic(Scope *sc); | 156 virtual void semantic(Scope *sc); |
171 virtual AggregateDeclaration *isThis(); // is a 'this' required to access the member | 172 virtual AggregateDeclaration *isThis(); // is a 'this' required to access the member |
172 virtual ClassDeclaration *isClassMember(); // are we a member of a class? | 173 virtual ClassDeclaration *isClassMember(); // are we a member of a class? |
173 virtual int isExport(); // is Dsymbol exported? | 174 virtual int isExport(); // is Dsymbol exported? |
174 virtual int isImportedSymbol(); // is Dsymbol imported? | 175 virtual int isImportedSymbol(); // is Dsymbol imported? |
175 virtual int isDeprecated(); // is Dsymbol deprecated? | 176 virtual int isDeprecated(); // is Dsymbol deprecated? |
177 #if DMDV2 | |
176 virtual int isOverloadable(); | 178 virtual int isOverloadable(); |
179 #endif | |
177 virtual LabelDsymbol *isLabel(); // is this a LabelDsymbol? | 180 virtual LabelDsymbol *isLabel(); // is this a LabelDsymbol? |
178 virtual AggregateDeclaration *isMember(); // is this symbol a member of an AggregateDeclaration? | 181 virtual AggregateDeclaration *isMember(); // is this symbol a member of an AggregateDeclaration? |
179 virtual Type *getType(); // is this a type? | 182 virtual Type *getType(); // is this a type? |
180 virtual char *mangle(); | 183 virtual char *mangle(); |
181 virtual int needThis(); // need a 'this' pointer? | 184 virtual int needThis(); // need a 'this' pointer? |
320 ArrayScopeSymbol *isArrayScopeSymbol() { return this; } | 323 ArrayScopeSymbol *isArrayScopeSymbol() { return this; } |
321 }; | 324 }; |
322 | 325 |
323 // Overload Sets | 326 // Overload Sets |
324 | 327 |
328 #if DMDV2 | |
325 struct OverloadSet : Dsymbol | 329 struct OverloadSet : Dsymbol |
326 { | 330 { |
327 Dsymbols a; // array of Dsymbols | 331 Dsymbols a; // array of Dsymbols |
328 | 332 |
329 OverloadSet(); | 333 OverloadSet(); |
330 void push(Dsymbol *s); | 334 void push(Dsymbol *s); |
331 OverloadSet *isOverloadSet() { return this; } | 335 OverloadSet *isOverloadSet() { return this; } |
332 const char *kind(); | 336 const char *kind(); |
333 }; | 337 }; |
338 #endif | |
334 | 339 |
335 // Table of Dsymbol's | 340 // Table of Dsymbol's |
336 | 341 |
337 struct DsymbolTable : Object | 342 struct DsymbolTable : Object |
338 { | 343 { |