Changeset 388
- Timestamp:
- 02/17/10 04:06:32 (2 years ago)
- Files:
-
- trunk/src/parse.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/parse.c
r385 r388 202 202 { 203 203 case TOKlparen: 204 // mixin(string)204 { // mixin(string) 205 205 nextToken(); 206 206 check(TOKlparen, "mixin"); … … 210 210 s = new CompileDeclaration(loc, e); 211 211 break; 212 212 } 213 213 case TOKtemplate: 214 214 // mixin template … … 4948 4948 id = token.ident; 4949 4949 nextToken(); 4950 if (token.value == TOKnot && peekNext() != TOKis)4950 if (token.value == TOKnot && (save = peekNext()) != TOKis && save != TOKin) 4951 4951 { // identifier!(template-argument-list) 4952 4952 TemplateInstance *tempinst; … … 5683 5683 case TOKnot: 5684 5684 tk = peek(tk); 5685 if (tk->value == TOKis ) // !is5685 if (tk->value == TOKis || tk->value == TOKin) // !is or !in 5686 5686 break; 5687 5687 case TOKdot: … … 5873 5873 continue; 5874 5874 5875 case TOKnot: // could be !in 5876 printf("test1\n"); 5877 if (peekNext() == TOKin) 5878 { 5879 printf("test2\n"); 5880 nextToken(); 5881 nextToken(); 5882 e2 = parseShiftExp(); 5883 e = new InExp(loc, e, e2); 5884 e = new NotExp(loc, e); 5885 continue; 5886 } 5887 break; 5888 5875 5889 case TOKin: 5876 5890 nextToken(); … … 5966 5980 // Attempt to identify '!is' 5967 5981 t = peek(&token); 5982 if (t->value == TOKin) 5983 { 5984 nextToken(); 5985 nextToken(); 5986 e2 = parseShiftExp(); 5987 e = new InExp(loc, e, e2); 5988 e = new NotExp(loc, e); 5989 break; 5990 } 5968 5991 if (t->value != TOKis) 5969 5992 break;
