Mercurial > projects > ldc
comparison dmd2/opover.c @ 847:356e65836fb5
Merged DMD 2.021 frontend.
Removed generated files from dmd/dmd2 dirs.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Sat, 13 Dec 2008 16:14:37 +0100 |
parents | f04dde6e882c |
children | 638d16625da2 |
comparison
equal
deleted
inserted
replaced
846:bc982f1ad106 | 847:356e65836fb5 |
---|---|
10 | 10 |
11 #include <stdio.h> | 11 #include <stdio.h> |
12 #include <stdlib.h> | 12 #include <stdlib.h> |
13 #include <ctype.h> | 13 #include <ctype.h> |
14 #include <assert.h> | 14 #include <assert.h> |
15 #if _MSC_VER | |
15 #include <complex> | 16 #include <complex> |
17 #else | |
18 #endif | |
16 | 19 |
17 #ifdef __APPLE__ | 20 #ifdef __APPLE__ |
18 #define integer_t dmd_integer_t | 21 #define integer_t dmd_integer_t |
19 #endif | 22 #endif |
20 | 23 |
546 case Tstruct: | 549 case Tstruct: |
547 ad = ((TypeStruct *)tab)->sym; | 550 ad = ((TypeStruct *)tab)->sym; |
548 goto Laggr; | 551 goto Laggr; |
549 | 552 |
550 Laggr: | 553 Laggr: |
551 #if 0 | |
552 if (arguments->dim == 1) | 554 if (arguments->dim == 1) |
553 { | 555 { |
554 if (!arg->type) | 556 if (!arg->type) |
555 { | 557 { |
556 /* Look for an opNext() overload | 558 /* Look for a head() or rear() overload |
557 */ | 559 */ |
558 Dsymbol *s = search_function(ad, Id::next); | 560 Identifier *id = (op == TOKforeach) ? Id::Fhead : Id::Ftoe; |
559 fd = s ? s->isFuncDeclaration() : NULL; | 561 Dsymbol *s = search_function(ad, id); |
562 FuncDeclaration *fd = s ? s->isFuncDeclaration() : NULL; | |
560 if (!fd) | 563 if (!fd) |
564 { if (s && s->isTemplateDeclaration()) | |
565 break; | |
561 goto Lapply; | 566 goto Lapply; |
562 arg->type = fd->type->next; | 567 } |
568 arg->type = fd->type->nextOf(); | |
563 } | 569 } |
564 break; | 570 break; |
565 } | 571 } |
566 #endif | 572 |
567 Lapply: | 573 Lapply: |
568 { /* Look for an | 574 { /* Look for an |
569 * int opApply(int delegate(ref Type [, ...]) dg); | 575 * int opApply(int delegate(ref Type [, ...]) dg); |
570 * overload | 576 * overload |
571 */ | 577 */ |