use trace for ~
This commit is contained in:
@@ -81,7 +81,7 @@ class Reader {
|
|||||||
var pos = stream.position();
|
var pos = stream.position();
|
||||||
var expToPrint = assertRead(stream, k);
|
var expToPrint = assertRead(stream, k);
|
||||||
var expToPrintRepresentation = StrExp(Reader.toString(expToPrint.def)).withPos(pos);
|
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:
|
// Helpful for defining predicates to pass to Haxe functions:
|
||||||
|
@@ -640,4 +640,5 @@ From:[(assert false (+ \"false \" \"should \" \"have \" \"been \" \"true\"))]" m
|
|||||||
(+= idx 1))))
|
(+= idx 1))))
|
||||||
|
|
||||||
(function _testTrace []
|
(function _testTrace []
|
||||||
(Assert.equals 5 (trace 5 "num")))
|
(Assert.equals 5 (trace 5 "num"))
|
||||||
|
(Assert.equals 5 ~5))
|
Reference in New Issue
Block a user