Changeset 140
- Timestamp:
- 01/20/08 12:22:34 (10 months ago)
- Files:
-
- branches/1.9/bin/walnut.exe (modified) (previous)
- branches/1.9/clean.bat (added)
- branches/1.9/make.bat (added)
- branches/1.9/source/interpreter.d (modified) (8 diffs)
- branches/1.9/source/main.d (modified) (1 diff)
- branches/1.9/source/methods.d (modified) (1 diff)
- branches/1.9/source/value.d (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.9/source/interpreter.d
r139 r140 8 8 9 9 private import 10 methods, // for debugging only11 10 structure, 12 TEXT = text,13 11 value; 14 15 private import16 std.string; // for debugging only17 18 12 19 13 /* … … 49 43 v.a = buffer; 50 44 v.type = TYPE.STATEMENTS; 51 scope(exit) 52 dumpTree(v, 1); 45 debug 46 scope(exit) 47 dumpTree(v, 1); 53 48 } 54 49 50 debug 55 51 void dumpTree(Value v, int tabDepth) 56 52 { … … 124 120 void parseBinaryOperator() 125 121 { 126 printf("!%d : parseBinaryOperator()\n",c);122 debug printf("!%d : parseBinaryOperator()\n",c); 127 123 switch(c[0]) { 128 124 case '+': … … 312 308 void parseOperand() 313 309 { 314 printf("!%d : parseOperand()\n",c);310 debug printf("!%d : parseOperand()\n",c); 315 311 int i; 316 312 bool neg; … … 473 469 else 474 470 d = 1.0; 475 printf("%.*s\n",std.string.toString(d));471 debug printf("%.*s\n",std.string.toString(d)); 476 472 } 477 473 if(neg) … … 930 926 void parseUnaryExpression() 931 927 { 932 printf("!%d : parseUnaryExpression()\n",c);928 debug printf("!%d : parseUnaryExpression()\n",c); 933 929 Value[] buffer; 934 930 bool bFlag = false; … … 1015 1011 void parseExpression() 1016 1012 { 1017 printf("!%d : parseExpression()\n",c);1013 debug printf("!%d : parseExpression()\n",c); 1018 1014 Value[] buffer; 1019 1015 bool bFlag = false; … … 1055 1051 void parseStatement() 1056 1052 { 1057 printf("!%d : parseStatement()\n",c);1053 debug printf("!%d : parseStatement()\n",c); 1058 1054 Value[] buffer; 1059 1055 const_string s; branches/1.9/source/main.d
r139 r140 16 16 value; 17 17 18 pragma(lib,"bin\\walnut.lib");18 // pragma(lib,"bin\\walnut.lib"); 19 19 20 20 enum EXIT { branches/1.9/source/methods.d
r139 r140 12 12 import std.uri : decode, decodeComponent, encode, encodeComponent; 13 13 import 14 interpreter,15 14 structure, 16 15 TEXT = text, branches/1.9/source/value.d
r139 r140 11 11 static import 12 12 std.date, 13 std.regexp, 14 std.string; 13 std.regexp; 15 14 import 16 15 methods, … … 448 447 case TYPE.UNDEFINED: 449 448 case TYPE.NULL: assert(0, TEXT._unexpected_token); // throw a TypeError 450 /* case TYPE.FUNCTION: return Function_prototype_constructor(this, Global); 449 450 /* BUG: Brainfart at 1:57am, how do you get it to compile ref Value with this? 451 452 case TYPE.FUNCTION: return Function_prototype_constructor(this, Global); 451 453 case TYPE.ARRAY: return Array_prototype_constructor(this, Global); 452 454 case TYPE.REGEXP: return RegExp_prototype_constructor(this, Global);
