Mercurial > projects > ldc
diff dmd/template.h @ 336:aaade6ded589 trunk
[svn r357] Merged DMD 1.033
author | lindquist |
---|---|
date | Sat, 12 Jul 2008 19:38:31 +0200 |
parents | 571959608194 |
children | cecfee2d01a8 |
line wrap: on
line diff
--- a/dmd/template.h Sat Jul 12 17:04:36 2008 +0200 +++ b/dmd/template.h Sat Jul 12 19:38:31 2008 +0200 @@ -26,6 +26,7 @@ struct TemplateInstance; struct TemplateParameter; struct TemplateTypeParameter; +struct TemplateThisParameter; struct TemplateValueParameter; struct TemplateAliasParameter; struct TemplateTupleParameter; @@ -52,7 +53,7 @@ TemplateParameters *origParameters; // originals for Ddoc - Array instances; // array of TemplateInstance's + Array instances; // array of TemplateInstance's TemplateDeclaration *overnext; // next overloaded TemplateDeclaration TemplateDeclaration *overroot; // first in overnext list @@ -65,7 +66,7 @@ void semantic(Scope *sc); int overloadInsert(Dsymbol *s); void toCBuffer(OutBuffer *buf, HdrGenState *hgs); - char *kind(); + const char *kind(); char *toChars(); void emitComment(Scope *sc); @@ -152,6 +153,23 @@ void *dummyArg(); }; +#if DMDV2 +struct TemplateThisParameter : TemplateTypeParameter +{ + /* Syntax: + * this ident : specType = defaultType + */ + Type *specType; // type parameter: if !=NULL, this is the type specialization + Type *defaultType; + + TemplateThisParameter(Loc loc, Identifier *ident, Type *specType, Type *defaultType); + + TemplateThisParameter *isTemplateThisParameter(); + TemplateParameter *syntaxCopy(); + void toCBuffer(OutBuffer *buf, HdrGenState *hgs); +}; +#endif + struct TemplateValueParameter : TemplateParameter { /* Syntax: @@ -251,6 +269,7 @@ // sole member WithScopeSymbol *withsym; // if a member of a with statement int semanticdone; // has semantic() been done? + int semantictiargsdone; // has semanticTiargs() been done? int nest; // for recursion detection int havetempdecl; // 1 if used second constructor Dsymbol *isnested; // if referencing local symbols, this is the context @@ -272,12 +291,12 @@ void inlineScan(); void toCBuffer(OutBuffer *buf, HdrGenState *hgs); Dsymbol *toAlias(); // resolve real symbol - char *kind(); + const char *kind(); int oneMember(Dsymbol **ps); char *toChars(); char *mangle(); - void toObjFile(); // compile to .obj file + void toObjFile(int multiobj); // compile to .obj file // Internal static void semanticTiargs(Loc loc, Scope *sc, Objects *tiargs); @@ -305,14 +324,14 @@ void semantic2(Scope *sc); void semantic3(Scope *sc); void inlineScan(); - char *kind(); + const char *kind(); int oneMember(Dsymbol **ps); int hasPointers(); char *toChars(); char *mangle(); void toCBuffer(OutBuffer *buf, HdrGenState *hgs); - void toObjFile(); // compile to .obj file + void toObjFile(int multiobj); // compile to .obj file TemplateMixin *isTemplateMixin() { return this; } };