KissInterp

This commit is contained in:
2021-05-18 17:39:11 -06:00
parent 76a690710f
commit cf99052b1b
3 changed files with 18 additions and 0 deletions

View File

@@ -18,6 +18,9 @@ using kiss.Helpers;
using kiss.Kiss;
using StringTools;
/**
* Compile-time helper functions for Kiss. Don't import or reference these at runtime.
*/
class Helpers {
public static function macroPos(exp:ReaderExp) {
var kissPos = exp.pos;

14
src/kiss/KissInterp.hx Normal file
View File

@@ -0,0 +1,14 @@
package kiss;
import hscript.Interp;
class KissInterp extends Interp {
// TODO standardize this with KissConfig.prepareInterp
function new() {
super();
variables.set("Prelude", Prelude);
variables.set("Lambda", Lambda);
variables.set("Std", Std);
}
}

View File

@@ -301,6 +301,7 @@ class Prelude {
kissProcess = new Process("haxelib", ["run", "kiss", "--hscript"]);
kissProcess.stdin.writeString('${kissStr.replace("\n", " ")}\n');
try {
var output = kissProcess.stdout.readLine();
if (output.startsWith(">>> ")) {