Differences From Artifact [e659b2cb410288fd]:
- File
main.d
- 2010-11-23 07:42:13 - part of checkin [6ac127ddd0] on branch trunk - new evaluator (user: kinaba) [annotate]
To Artifact [cbf6e2570b5a90b0]:
- File
main.d
- 2010-11-23 09:36:27 - part of checkin [b97bd4f713] on branch trunk - automatic AST to table encoder (user: kinaba) [annotate]
10 import std.array; 10 import std.array;
11 import polemy.value; 11 import polemy.value;
12 import polemy.failure; 12 import polemy.failure;
13 import polemy.layer; 13 import polemy.layer;
14 import polemy.parse; 14 import polemy.parse;
15 import polemy.ast; 15 import polemy.ast;
16 import polemy.eval; 16 import polemy.eval;
> 17 import polemy.runtime;
17 18
18 enum VersionNoMajor = 0; 19 enum VersionNoMajor = 0;
19 enum VersionNoMinor = 1; 20 enum VersionNoMinor = 1;
20 enum VersionNoRev = 0; 21 enum VersionNoRev = 0;
21 22
22 /// Read-Eval-Print-Loop 23 /// Read-Eval-Print-Loop
23 24
................................................................................................................................................................................
24 class REPL 25 class REPL
25 { 26 {
26 Evaluator ev; 27 Evaluator ev;
27 /// Load the prelude environment 28 /// Load the prelude environment
28 this() 29 this()
29 { 30 {
30 ev = new Evaluator; 31 ev = new Evaluator;
> 32 enrollRuntimeLibrary(ev);
31 } 33 }
32 34
33 /// Print the version number etc. 35 /// Print the version number etc.
34 void greet() 36 void greet()
35 { 37 {
36 writefln("Welcome to Polemy %d.%d.%d", VersionNoMajor, VersionNo 38 writefln("Welcome to Polemy %d.%d.%d", VersionNoMajor, VersionNo
37 } 39 }