Mercurial > projects > ldc
comparison dmd/template.h @ 1587:def7a1d494fd
Merge DMD 1.051
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 06 Nov 2009 23:58:01 +0100 |
parents | 8026319762be |
children | 1d0220dd613a |
comparison
equal
deleted
inserted
replaced
1586:7f728c52e63c | 1587:def7a1d494fd |
---|---|
58 Array instances; // array of TemplateInstance's | 58 Array instances; // array of TemplateInstance's |
59 | 59 |
60 TemplateDeclaration *overnext; // next overloaded TemplateDeclaration | 60 TemplateDeclaration *overnext; // next overloaded TemplateDeclaration |
61 TemplateDeclaration *overroot; // first in overnext list | 61 TemplateDeclaration *overroot; // first in overnext list |
62 | 62 |
63 Scope *scope; | 63 int semanticRun; // 1 semantic() run |
64 | |
64 Dsymbol *onemember; // if !=NULL then one member of this template | 65 Dsymbol *onemember; // if !=NULL then one member of this template |
65 | 66 |
66 TemplateDeclaration(Loc loc, Identifier *id, TemplateParameters *parameters, | 67 TemplateDeclaration(Loc loc, Identifier *id, TemplateParameters *parameters, |
67 Expression *constraint, Array *decldefs); | 68 Expression *constraint, Array *decldefs); |
68 Dsymbol *syntaxCopy(Dsymbol *); | 69 Dsymbol *syntaxCopy(Dsymbol *); |
71 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); | 72 void toCBuffer(OutBuffer *buf, HdrGenState *hgs); |
72 const char *kind(); | 73 const char *kind(); |
73 char *toChars(); | 74 char *toChars(); |
74 | 75 |
75 void emitComment(Scope *sc); | 76 void emitComment(Scope *sc); |
77 void toJsonBuffer(OutBuffer *buf); | |
76 // void toDocBuffer(OutBuffer *buf); | 78 // void toDocBuffer(OutBuffer *buf); |
77 | 79 |
78 MATCH matchWithInstance(TemplateInstance *ti, Objects *atypes, int flag); | 80 MATCH matchWithInstance(TemplateInstance *ti, Objects *atypes, int flag); |
79 MATCH leastAsSpecialized(TemplateDeclaration *td2); | 81 MATCH leastAsSpecialized(TemplateDeclaration *td2); |
80 | 82 |
280 TemplateInstance *tinst; // enclosing template instance | 282 TemplateInstance *tinst; // enclosing template instance |
281 ScopeDsymbol *argsym; // argument symbol table | 283 ScopeDsymbol *argsym; // argument symbol table |
282 AliasDeclaration *aliasdecl; // !=NULL if instance is an alias for its | 284 AliasDeclaration *aliasdecl; // !=NULL if instance is an alias for its |
283 // sole member | 285 // sole member |
284 WithScopeSymbol *withsym; // if a member of a with statement | 286 WithScopeSymbol *withsym; // if a member of a with statement |
285 int semanticdone; // has semantic() been done? | 287 int semanticRun; // has semantic() been done? |
286 int semantictiargsdone; // has semanticTiargs() been done? | 288 int semantictiargsdone; // has semanticTiargs() been done? |
287 int nest; // for recursion detection | 289 int nest; // for recursion detection |
288 int havetempdecl; // 1 if used second constructor | 290 int havetempdecl; // 1 if used second constructor |
289 Dsymbol *isnested; // if referencing local symbols, this is the context | 291 Dsymbol *isnested; // if referencing local symbols, this is the context |
290 int errors; // 1 if compiled with errors | 292 int errors; // 1 if compiled with errors |
338 | 340 |
339 struct TemplateMixin : TemplateInstance | 341 struct TemplateMixin : TemplateInstance |
340 { | 342 { |
341 Array *idents; | 343 Array *idents; |
342 Type *tqual; | 344 Type *tqual; |
343 | |
344 Scope *scope; // for forward referencing | |
345 | 345 |
346 TemplateMixin(Loc loc, Identifier *ident, Type *tqual, Array *idents, Objects *tiargs); | 346 TemplateMixin(Loc loc, Identifier *ident, Type *tqual, Array *idents, Objects *tiargs); |
347 Dsymbol *syntaxCopy(Dsymbol *s); | 347 Dsymbol *syntaxCopy(Dsymbol *s); |
348 void semantic(Scope *sc); | 348 void semantic(Scope *sc); |
349 void semantic2(Scope *sc); | 349 void semantic2(Scope *sc); |