Changeset 145
- Timestamp:
- 01/22/08 07:07:24 (10 months ago)
- Files:
-
- branches/1.9/bin/walnut.exe (modified) (previous)
- branches/1.9/source/parser.d (modified) (9 diffs)
- branches/1.9/test/hello.nut (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.9/source/parser.d
r144 r145 35 35 11.12 page 58 36 36 37 BUG: 7.9.138 see also (interesting) 7.9.2 on page 22/2339 If a TOKEN NEWLINE } sequence is found, it may be transformed to TOKEN SEMI NEWLINE } if the former is invalid.40 41 37 BUG: 12.1 42 38 How do we differentiate a code block { } from an object literal at the beginning of a statement? 43 44 BUG:45 The start of one expression can be *immediately* after the end of the last.46 Exerpt: NOTE47 For example: "3in" is an error and not the two input elements 3 and in.48 39 49 40 BUG: 11.5, 11.6, 11.7, 11.8, 11.9, 11.10, 11.11, 11.13 page 48 … … 74 65 value; 75 66 76 uint line = 1 ;67 uint line = 1, lineMark; 77 68 char last = 0x00; 78 69 const_char* c; … … 84 75 Value[] buffer; 85 76 c = &source.toString()[0]; 86 const_char* cMark = void;87 77 context = cc; 78 const_char* cMark; 88 79 89 80 debug … … 133 124 assert(c[0] != ')', TEXT._unmatched_parenthesis); 134 125 parseExpression(); 135 136 126 /* Empty Statement 12.3 page 63 */ 137 127 if(c[0] == ';') 138 128 c++; 129 /* Statement Termination, aka Automatic Semicolon insertion 7.9.1, 7.9.2 on page 22/23 */ 130 else if(lineMark >= line) 131 assert(c[0] == '}' || c[0] == last, TEXT._unexpected_token); 139 132 } 140 133 … … 144 137 debug printf("!%d : parseExpression()\n",c); 145 138 Value[] buffer; 139 const_char* cMark; 146 140 bool bFlag = false; 147 const_char* cMark;148 141 142 lineMark = line; 149 143 parseWhitespace(); 150 144 cMark = c; … … 153 147 do { 154 148 buffer ~= v; 149 lineMark = line; 155 150 parseWhitespace(); 156 151 cMark = c; … … 257 252 debug printf("!%d : parseKeyword()\n",c); 258 253 254 Value[] buffer; 259 255 const_char* cMark; 260 Value[] buffer;261 256 int i; 262 257 … … 568 563 void parseVars() 569 564 { 565 Value[] buffer; 570 566 const_char* cMark; 571 Value[] buffer;572 567 debug printf("!%d : KEYVAR\n",c); 573 568 while(true) { … … 594 589 double d; 595 590 const_char* cMark = c; 596 597 591 switch(c[0]) { 598 592 case '\'': branches/1.9/test/hello.nut
r144 r145 1 { 2 susan = [(++bob+ (3)) , {"wh]a\"t" : 3, is:/in/i } , 4 ]; 3 } 4 "havana".withoutTab(); 5 "havan\a".and()."\havana".eat(); 6 "hav\tana".goTo(); 1 2 3+5 ; 3 8-12; 4+1
