comparison dmd/TypeBasic.d @ 157:b7b61140701d

* added all missing default cases in switch statements + Lexer.getDocComment + Lexer.combineComments
author trass3r
date Thu, 16 Sep 2010 01:34:10 +0200
parents 0c8cc2a10f99
children e3afd1303184
comparison
equal deleted inserted replaced
156:0c8cc2a10f99 157:b7b61140701d
128 break; 128 break;
129 129
130 case TY.Tdchar: d = Token.toChars(TOK.TOKdchar); 130 case TY.Tdchar: d = Token.toChars(TOK.TOKdchar);
131 flags |= TFLAGSintegral | TFLAGSunsigned; 131 flags |= TFLAGSintegral | TFLAGSunsigned;
132 break; 132 break;
133 default:
133 } 134 }
134 135
135 this.dstring = d; 136 this.dstring = d;
136 this.flags = flags; 137 this.flags = flags;
137 merge(); 138 merge();
191 case TY.Twchar: size = 2; break; 192 case TY.Twchar: size = 2; break;
192 case TY.Tdchar: size = 4; break; 193 case TY.Tdchar: size = 4; break;
193 194
194 default: 195 default:
195 assert(0); 196 assert(0);
196 break;
197 } 197 }
198 198
199 //printf("TypeBasic.size() = %d\n", size); 199 //printf("TypeBasic.size() = %d\n", size);
200 return size; 200 return size;
201 } 201 }
261 case TY.Timaginary64: 261 case TY.Timaginary64:
262 case TY.Tfloat64: fvalue = double.max;goto Lfvalue; 262 case TY.Tfloat64: fvalue = double.max;goto Lfvalue;
263 case TY.Tcomplex80: 263 case TY.Tcomplex80:
264 case TY.Timaginary80: 264 case TY.Timaginary80:
265 case TY.Tfloat80: fvalue = real.max; goto Lfvalue; 265 case TY.Tfloat80: fvalue = real.max; goto Lfvalue;
266 default:
266 } 267 }
267 } 268 }
268 else if (ident is Id.min) 269 else if (ident is Id.min)
269 { 270 {
270 switch (ty) 271 switch (ty)
327 case TY.Tfloat80: 328 case TY.Tfloat80:
328 { 329 {
329 fvalue = real.nan; 330 fvalue = real.nan;
330 goto Lfvalue; 331 goto Lfvalue;
331 } 332 }
333 default:
332 } 334 }
333 } 335 }
334 else if (ident is Id.infinity) 336 else if (ident is Id.infinity)
335 { 337 {
336 switch (ty) 338 switch (ty)
344 case TY.Tfloat32: 346 case TY.Tfloat32:
345 case TY.Tfloat64: 347 case TY.Tfloat64:
346 case TY.Tfloat80: 348 case TY.Tfloat80:
347 fvalue = real.infinity; 349 fvalue = real.infinity;
348 goto Lfvalue; 350 goto Lfvalue;
351 default:
349 } 352 }
350 } 353 }
351 else if (ident is Id.dig) 354 else if (ident is Id.dig)
352 { 355 {
353 switch (ty) 356 switch (ty)
359 case TY.Timaginary64: 362 case TY.Timaginary64:
360 case TY.Tfloat64: ivalue = double.dig; goto Lint; 363 case TY.Tfloat64: ivalue = double.dig; goto Lint;
361 case TY.Tcomplex80: 364 case TY.Tcomplex80:
362 case TY.Timaginary80: 365 case TY.Timaginary80:
363 case TY.Tfloat80: ivalue = real.dig; goto Lint; 366 case TY.Tfloat80: ivalue = real.dig; goto Lint;
367 default:
364 } 368 }
365 } 369 }
366 else if (ident is Id.epsilon) 370 else if (ident is Id.epsilon)
367 { 371 {
368 switch (ty) 372 switch (ty)
374 case TY.Timaginary64: 378 case TY.Timaginary64:
375 case TY.Tfloat64: fvalue = double.epsilon; goto Lfvalue; 379 case TY.Tfloat64: fvalue = double.epsilon; goto Lfvalue;
376 case TY.Tcomplex80: 380 case TY.Tcomplex80:
377 case TY.Timaginary80: 381 case TY.Timaginary80:
378 case TY.Tfloat80: fvalue = real.epsilon; goto Lfvalue; 382 case TY.Tfloat80: fvalue = real.epsilon; goto Lfvalue;
383 default:
379 } 384 }
380 } 385 }
381 else if (ident is Id.mant_dig) 386 else if (ident is Id.mant_dig)
382 { 387 {
383 switch (ty) 388 switch (ty)
389 case TY.Timaginary64: 394 case TY.Timaginary64:
390 case TY.Tfloat64: ivalue = double.mant_dig; goto Lint; 395 case TY.Tfloat64: ivalue = double.mant_dig; goto Lint;
391 case TY.Tcomplex80: 396 case TY.Tcomplex80:
392 case TY.Timaginary80: 397 case TY.Timaginary80:
393 case TY.Tfloat80: ivalue = real.mant_dig; goto Lint; 398 case TY.Tfloat80: ivalue = real.mant_dig; goto Lint;
399 default:
394 } 400 }
395 } 401 }
396 else if (ident is Id.max_10_exp) 402 else if (ident is Id.max_10_exp)
397 { 403 {
398 switch (ty) 404 switch (ty)
404 case TY.Timaginary64: 410 case TY.Timaginary64:
405 case TY.Tfloat64: ivalue = double.max_10_exp; goto Lint; 411 case TY.Tfloat64: ivalue = double.max_10_exp; goto Lint;
406 case TY.Tcomplex80: 412 case TY.Tcomplex80:
407 case TY.Timaginary80: 413 case TY.Timaginary80:
408 case TY.Tfloat80: ivalue = real.max_10_exp; goto Lint; 414 case TY.Tfloat80: ivalue = real.max_10_exp; goto Lint;
415 default:
409 } 416 }
410 } 417 }
411 else if (ident is Id.max_exp) 418 else if (ident is Id.max_exp)
412 { 419 {
413 switch (ty) 420 switch (ty)
419 case TY.Timaginary64: 426 case TY.Timaginary64:
420 case TY.Tfloat64: ivalue = double.max_exp; goto Lint; 427 case TY.Tfloat64: ivalue = double.max_exp; goto Lint;
421 case TY.Tcomplex80: 428 case TY.Tcomplex80:
422 case TY.Timaginary80: 429 case TY.Timaginary80:
423 case TY.Tfloat80: ivalue = real.max_exp; goto Lint; 430 case TY.Tfloat80: ivalue = real.max_exp; goto Lint;
431 default:
424 } 432 }
425 } 433 }
426 else if (ident is Id.min_10_exp) 434 else if (ident is Id.min_10_exp)
427 { 435 {
428 switch (ty) 436 switch (ty)
434 case TY.Timaginary64: 442 case TY.Timaginary64:
435 case TY.Tfloat64: ivalue = double.min_10_exp; goto Lint; 443 case TY.Tfloat64: ivalue = double.min_10_exp; goto Lint;
436 case TY.Tcomplex80: 444 case TY.Tcomplex80:
437 case TY.Timaginary80: 445 case TY.Timaginary80:
438 case TY.Tfloat80: ivalue = real.min_10_exp; goto Lint; 446 case TY.Tfloat80: ivalue = real.min_10_exp; goto Lint;
447 default:
439 } 448 }
440 } 449 }
441 else if (ident is Id.min_exp) 450 else if (ident is Id.min_exp)
442 { 451 {
443 switch (ty) 452 switch (ty)
449 case TY.Timaginary64: 458 case TY.Timaginary64:
450 case TY.Tfloat64: ivalue = double.min_exp; goto Lint; 459 case TY.Tfloat64: ivalue = double.min_exp; goto Lint;
451 case TY.Tcomplex80: 460 case TY.Tcomplex80:
452 case TY.Timaginary80: 461 case TY.Timaginary80:
453 case TY.Tfloat80: ivalue = real.min_exp; goto Lint; 462 case TY.Tfloat80: ivalue = real.min_exp; goto Lint;
463 default:
454 } 464 }
455 } 465 }
456 466
457 Ldefault: 467 Ldefault:
458 return Type.getProperty(loc, ident); 468 return Type.getProperty(loc, ident);