fix some calls of readAndProcess

This commit is contained in:
2024-12-12 20:54:39 -06:00
parent 8597cc0de9
commit 35471dc318
2 changed files with 5 additions and 5 deletions

View File

@@ -476,7 +476,7 @@ class AsyncEmbeddedScript2 {
#if profileKiss
Kiss.measure('Compiling kiss: $scriptFile', () -> {
#end
function process(nextExp:ReaderExp) {
function process(nextExp:ReaderExp, str) {
#if (kissCache && !lua)
var cacheKey = Reader.toString(nextExp.def);
if (cache.exists(Prelude.hashableString(cacheKey))) {
@@ -490,7 +490,7 @@ class AsyncEmbeddedScript2 {
if (autoLabelInterval > 0 && commandList.length > lastLabelIp + autoLabelInterval){
var b = nextExp.expBuilder();
lastLabelIp = commandList.length;
process(b.callSymbol("label", [b.symbol("auto")]));
process(b.callSymbol("label", [b.symbol("auto")]), "(label auto)");
}
nextExp = Kiss._try(()->Kiss.macroExpand(nextExp, k));
@@ -502,7 +502,7 @@ class AsyncEmbeddedScript2 {
case CallExp({pos: _, def: Symbol("commands")},
commands):
for (exp in commands) {
process(exp);
process(exp, Reader.toString(exp.def));
}
return;
default:

View File

@@ -313,7 +313,7 @@ class Main {
if (args.indexOf("--all") != -1) {
var kissInputStream = Stream.fromString(Sys.stdin().readAll().toString());
Reader.readAndProcess(kissInputStream, k, (readerExp) -> {
Reader.readAndProcess(kissInputStream, k, (readerExp, str) -> {
print(Kiss.readerExpToHaxeExpr(readerExp, k).toString());
});
} else {
@@ -334,7 +334,7 @@ class Main {
}
var kissInputStream = Stream.fromString(line);
Reader.readAndProcess(kissInputStream, k, (readerExp) -> {
Reader.readAndProcess(kissInputStream, k, (readerExp, str) -> {
print(Kiss.readerExpToHaxeExpr(readerExp, k).toString());
});