comparison dmd/parse.c @ 1603:eae495e6ae8d

Merge DMD r248: implement Denis Koroskin's macro suggestion --- dmd/lexer.c | 2 +- dmd/lexer.h | 8 ++++---- dmd/mars.c | 2 +- dmd/parse.c | 12 ++++++------ 4 files changed, 12 insertions(+), 12 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:19 -0300
parents a413ae7329bf
children 207a8a438dea
comparison
equal deleted inserted replaced
1602:a413ae7329bf 1603:eae495e6ae8d
193 } 193 }
194 s = parseMixin(); 194 s = parseMixin();
195 break; 195 break;
196 } 196 }
197 197
198 CASE_BASIC_TYPES: 198 case BASIC_TYPES:
199 case TOKalias: 199 case TOKalias:
200 case TOKtypedef: 200 case TOKtypedef:
201 case TOKidentifier: 201 case TOKidentifier:
202 case TOKtypeof: 202 case TOKtypeof:
203 case TOKdot: 203 case TOKdot:
1776 TemplateInstance *tempinst; 1776 TemplateInstance *tempinst;
1777 1777
1778 //printf("parseBasicType()\n"); 1778 //printf("parseBasicType()\n");
1779 switch (token.value) 1779 switch (token.value)
1780 { 1780 {
1781 CASE_BASIC_TYPES_X(t): 1781 case BASIC_TYPES_X(t):
1782 nextToken(); 1782 nextToken();
1783 break; 1783 break;
1784 1784
1785 case TOKidentifier: 1785 case TOKidentifier:
1786 id = token.ident; 1786 id = token.ident;
2835 goto Lcondition; 2835 goto Lcondition;
2836 } 2836 }
2837 goto Ldeclaration; 2837 goto Ldeclaration;
2838 } 2838 }
2839 2839
2840 CASE_BASIC_TYPES: 2840 case BASIC_TYPES:
2841 case TOKtypedef: 2841 case TOKtypedef:
2842 case TOKalias: 2842 case TOKalias:
2843 case TOKconst: 2843 case TOKconst:
2844 case TOKauto: 2844 case TOKauto:
2845 case TOKextern: 2845 case TOKextern:
3628 Token *t2; 3628 Token *t2;
3629 int parens; 3629 int parens;
3630 3630
3631 switch (t->value) 3631 switch (t->value)
3632 { 3632 {
3633 CASE_BASIC_TYPES: 3633 case BASIC_TYPES:
3634 t = peek(t); 3634 t = peek(t);
3635 break; 3635 break;
3636 3636
3637 case TOKidentifier: 3637 case TOKidentifier:
3638 t = peek(t); 3638 t = peek(t);
4268 } 4268 }
4269 e = new StringExp(loc, s, len, postfix); 4269 e = new StringExp(loc, s, len, postfix);
4270 break; 4270 break;
4271 } 4271 }
4272 4272
4273 CASE_BASIC_TYPES_X(t): 4273 case BASIC_TYPES_X(t):
4274 nextToken(); 4274 nextToken();
4275 L1: 4275 L1:
4276 check(TOKdot, t->toChars()); 4276 check(TOKdot, t->toChars());
4277 if (token.value != TOKidentifier) 4277 if (token.value != TOKidentifier)
4278 { error("found '%s' when expecting identifier following '%s.'", token.toChars(), t->toChars()); 4278 { error("found '%s' when expecting identifier following '%s.'", token.toChars(), t->toChars());
4764 case TOKtypeof: 4764 case TOKtypeof:
4765 #if DMDV2 4765 #if DMDV2
4766 case TOKfile: 4766 case TOKfile:
4767 case TOKline: 4767 case TOKline:
4768 #endif 4768 #endif
4769 CASE_BASIC_TYPES: // (type)int.size 4769 case BASIC_TYPES: // (type)int.size
4770 { // (type) una_exp 4770 { // (type) una_exp
4771 Type *t; 4771 Type *t;
4772 4772
4773 nextToken(); 4773 nextToken();
4774 t = parseBasicType(); 4774 t = parseBasicType();