use trace for ~

This commit is contained in:
2022-06-05 16:24:12 +00:00
parent 7bf6a6e538
commit 76427668d3
2 changed files with 3 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ class Reader {
var pos = stream.position();
var expToPrint = assertRead(stream, k);
var expToPrintRepresentation = StrExp(Reader.toString(expToPrint.def)).withPos(pos);
CallExp(Symbol("print").withPos(pos), [expToPrint, expToPrintRepresentation]);
CallExp(Symbol("trace").withPos(pos), [expToPrint, expToPrintRepresentation]);
}
// Helpful for defining predicates to pass to Haxe functions:

View File

@@ -640,4 +640,5 @@ From:[(assert false (+ \"false \" \"should \" \"have \" \"been \" \"true\"))]" m
(+= idx 1))))
(function _testTrace []
(Assert.equals 5 (trace 5 "num")))
(Assert.equals 5 (trace 5 "num"))
(Assert.equals 5 ~5))