Diff
Not logged in

Differences From Artifact [3594122dc7a67c3c]:

To Artifact [636370f08c051cf2]:


9 9 import std.algorithm; 10 10 import std.array; 11 11 import polemy.value; 12 12 import polemy.failure; 13 13 import polemy.parse; 14 14 import polemy.ast; 15 15 import polemy.eval; 16 +import polemy.layer; 16 17 17 18 enum VersionNoMajor = 0; 18 19 enum VersionNoMinor = 1; 19 20 enum VersionNoRev = 0; 20 21 21 22 /// Read-Eval-Print-Loop 22 23 ................................................................................ 33 34 { 34 35 writefln("Welcome to Polemy %d.%d.%d", VersionNoMajor, VersionNoMinor, VersionNoRev); 35 36 } 36 37 37 38 /// Run one file on the global scope 38 39 void runFile(string filename) 39 40 { 40 - eval(parseFile(filename), ctx, false, "@v"); 41 + eval(parseFile(filename), ctx, false, ValueLayer); 41 42 } 42 43 43 44 /// Repeat the singleInteraction 44 45 void replLoop() 45 46 { 46 47 while( singleInteraction() ) {} 47 48 } ................................................................................ 73 74 { 74 75 scope(failure) 75 76 { buf = ""; lineno = nextlineno; } 76 77 77 78 buf ~= s; 78 79 nextlineno ++; 79 80 try 80 - { lastVal = eval(parseString(buf, "<REPL>", lineno), ctx, false, "@v"); } 81 + { lastVal = eval(parseString(buf, "<REPL>", lineno), ctx, false, ValueLayer); } 81 82 catch( UnexpectedEOF ) 82 83 { return false; } // wait 83 84 buf = ""; 84 85 lineno = nextlineno; 85 86 return true; 86 87 } 87 88 }