Differences From Artifact [667427a12e5e3b09]:
- File
main.d
- 2010-11-09 14:59:36 - part of checkin [7465fcdd7f] on branch trunk - layered function invocation (user: kinaba) [annotate]
To Artifact [abae545f4409680b]:
- File
main.d
- 2010-11-10 12:38:54 - part of checkin [38fcc662be] on branch trunk - cleaned up documentation comments (user: kinaba) [annotate]
9 9 import std.algorithm;
10 10 import polemy.value;
11 11 import polemy.lex;
12 12 import polemy.parse;
13 13 import polemy.ast;
14 14 import polemy.eval;
15 15
16 +/// Tenuki Read-Eval-Print-Loop
16 17 class REPL
17 18 {
18 19 Table ctx;
19 20 string buf;
20 21 Value lastVal;
21 22 int lineno = 1;
22 23 int nextlineno = 1;
................................................................................
55 56 }
56 57
57 58 version(unittest) {
58 59 bool success = false;
59 60 static ~this(){ if(!success){writeln("(press enter to exit)"); readln();} }
60 61 }
61 62
63 +/// Entry point. If args.length==1, invoke REPL.
64 +/// Otherwise interpret the argument as a filename.
62 65 void main( string[] args )
63 66 {
64 67 version(unittest) success=true;
65 68
66 69 if( args.length <= 1 )
67 70 {
68 71 writeln("Welcome to Polemy 0.1.0");