fix some calls of readAndProcess
This commit is contained in:
@@ -476,7 +476,7 @@ class AsyncEmbeddedScript2 {
|
|||||||
#if profileKiss
|
#if profileKiss
|
||||||
Kiss.measure('Compiling kiss: $scriptFile', () -> {
|
Kiss.measure('Compiling kiss: $scriptFile', () -> {
|
||||||
#end
|
#end
|
||||||
function process(nextExp:ReaderExp) {
|
function process(nextExp:ReaderExp, str) {
|
||||||
#if (kissCache && !lua)
|
#if (kissCache && !lua)
|
||||||
var cacheKey = Reader.toString(nextExp.def);
|
var cacheKey = Reader.toString(nextExp.def);
|
||||||
if (cache.exists(Prelude.hashableString(cacheKey))) {
|
if (cache.exists(Prelude.hashableString(cacheKey))) {
|
||||||
@@ -490,7 +490,7 @@ class AsyncEmbeddedScript2 {
|
|||||||
if (autoLabelInterval > 0 && commandList.length > lastLabelIp + autoLabelInterval){
|
if (autoLabelInterval > 0 && commandList.length > lastLabelIp + autoLabelInterval){
|
||||||
var b = nextExp.expBuilder();
|
var b = nextExp.expBuilder();
|
||||||
lastLabelIp = commandList.length;
|
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));
|
nextExp = Kiss._try(()->Kiss.macroExpand(nextExp, k));
|
||||||
@@ -502,7 +502,7 @@ class AsyncEmbeddedScript2 {
|
|||||||
case CallExp({pos: _, def: Symbol("commands")},
|
case CallExp({pos: _, def: Symbol("commands")},
|
||||||
commands):
|
commands):
|
||||||
for (exp in commands) {
|
for (exp in commands) {
|
||||||
process(exp);
|
process(exp, Reader.toString(exp.def));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
|
@@ -313,7 +313,7 @@ class Main {
|
|||||||
|
|
||||||
if (args.indexOf("--all") != -1) {
|
if (args.indexOf("--all") != -1) {
|
||||||
var kissInputStream = Stream.fromString(Sys.stdin().readAll().toString());
|
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());
|
print(Kiss.readerExpToHaxeExpr(readerExp, k).toString());
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@@ -334,7 +334,7 @@ class Main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var kissInputStream = Stream.fromString(line);
|
var kissInputStream = Stream.fromString(line);
|
||||||
Reader.readAndProcess(kissInputStream, k, (readerExp) -> {
|
Reader.readAndProcess(kissInputStream, k, (readerExp, str) -> {
|
||||||
print(Kiss.readerExpToHaxeExpr(readerExp, k).toString());
|
print(Kiss.readerExpToHaxeExpr(readerExp, k).toString());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user