Mercurial > projects > ddmd
comparison dmd/Parser.d @ 121:347de076ad34
TemplateParameters -> Vector
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Thu, 02 Sep 2010 22:41:12 +0100 |
parents | e28b18c23469 |
children | c77e9f4f1793 |
comparison
equal
deleted
inserted
replaced
120:46ef67271ef3 | 121:347de076ad34 |
---|---|
1067 nextToken(); | 1067 nextToken(); |
1068 tp_defaultvalue = parseDefaultInitExp(); | 1068 tp_defaultvalue = parseDefaultInitExp(); |
1069 } | 1069 } |
1070 tp = new TemplateValueParameter(loc, tp_ident, tp_valtype, tp_specvalue, tp_defaultvalue); | 1070 tp = new TemplateValueParameter(loc, tp_ident, tp_valtype, tp_specvalue, tp_defaultvalue); |
1071 } | 1071 } |
1072 tpl.push(cast(void*)tp); | 1072 tpl.push(tp); |
1073 if (token.value != TOKcomma) | 1073 if (token.value != TOKcomma) |
1074 break; | 1074 break; |
1075 nextToken(); | 1075 nextToken(); |
1076 } | 1076 } |
1077 } | 1077 } |
1236 */ | 1236 */ |
1237 TypeIdentifier pt = cast(TypeIdentifier)param.type; | 1237 TypeIdentifier pt = cast(TypeIdentifier)param.type; |
1238 param.ident = pt.ident; | 1238 param.ident = pt.ident; |
1239 Identifier id = Lexer.uniqueId("__T"); | 1239 Identifier id = Lexer.uniqueId("__T"); |
1240 param.type = new TypeIdentifier(pt.loc, id); | 1240 param.type = new TypeIdentifier(pt.loc, id); |
1241 TemplateParameter tp = new TemplateTypeParameter(fd.loc, id, null, null); | 1241 auto tp = new TemplateTypeParameter(fd.loc, id, null, null); |
1242 if (!tpl) | 1242 if (!tpl) |
1243 tpl = new TemplateParameters(); | 1243 tpl = new TemplateParameters(); |
1244 tpl.push(cast(void*)tp); | 1244 tpl.push(tp); |
1245 } | 1245 } |
1246 } | 1246 } |
1247 | 1247 |
1248 if (tpl) | 1248 if (tpl) |
1249 { | 1249 { |
5194 else | 5194 else |
5195 { tpl = new TemplateParameters(); | 5195 { tpl = new TemplateParameters(); |
5196 check(TOK.TOKrparen); | 5196 check(TOK.TOKrparen); |
5197 } | 5197 } |
5198 TemplateParameter tp = new TemplateTypeParameter(loc2, ident, null, null); | 5198 TemplateParameter tp = new TemplateTypeParameter(loc2, ident, null, null); |
5199 tpl.insert(0, cast(void*)tp); | 5199 tpl.insert(0, tp); |
5200 } | 5200 } |
5201 else | 5201 else |
5202 check(TOK.TOKrparen); | 5202 check(TOK.TOKrparen); |
5203 } | 5203 } |
5204 else | 5204 else |