comparison dmd2/parse.c @ 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
2264 enum TOK save = token.value; 2264 enum TOK save = token.value;
2265 2265
2266 nextToken(); 2266 nextToken();
2267 arguments = parseParameters(&varargs); 2267 arguments = parseParameters(&varargs);
2268 while (1) 2268 while (1)
2269 { // Postfixes of 'pure' or 'nothrow' 2269 { // Postfixes
2270 if (token.value == TOKpure) 2270 if (token.value == TOKpure)
2271 ispure = true; 2271 ispure = true;
2272 else if (token.value == TOKnothrow) 2272 else if (token.value == TOKnothrow)
2273 isnothrow = true; 2273 isnothrow = true;
2274 else 2274 else
2431 2431
2432 case TOKpure: 2432 case TOKpure:
2433 ((TypeFunction *)tf)->ispure = 1; 2433 ((TypeFunction *)tf)->ispure = 1;
2434 nextToken(); 2434 nextToken();
2435 continue; 2435 continue;
2436
2437 case TOKat:
2438 nextToken();
2439 if (token.value != TOKidentifier)
2440 { error("attribute identifier expected");
2441 nextToken();
2442 continue;
2443 }
2444 Identifier *id = token.ident;
2445 if (id == Id::property)
2446 ((TypeFunction *)tf)->ispure = 1;
2447 else
2448 error("valid attribute identifiers are property, not %s", id->toChars());
2449 nextToken();
2450 continue;
2451
2436 } 2452 }
2437 break; 2453 break;
2438 } 2454 }
2439 2455
2440 /* Insert tf into 2456 /* Insert tf into
4358 case TOKimmutable: 4374 case TOKimmutable:
4359 case TOKshared: 4375 case TOKshared:
4360 case TOKpure: 4376 case TOKpure:
4361 case TOKnothrow: 4377 case TOKnothrow:
4362 t = peek(t); 4378 t = peek(t);
4379 continue;
4380 case TOKat:
4381 t = peek(t); // skip '@'
4382 t = peek(t); // skip identifier
4363 continue; 4383 continue;
4364 default: 4384 default:
4365 break; 4385 break;
4366 } 4386 }
4367 break; 4387 break;