change raw haxe

This commit is contained in:
Yvon
2022-06-11 22:54:20 +03:00
committed by Nat Quayle Nelson
parent 1f893cf5c2
commit 90269672ed
4 changed files with 5 additions and 5 deletions

View File

@@ -202,7 +202,6 @@ class Macros {
for (matchBodySymbol in matchBodySymbols) {
caseInterp.variables.set(Prelude.symbolNameValue(matchBodySymbol), matchBodies.shift());
}
prepareForConditional(caseInterp, k);
try {
var hscriptStr = Prelude.convertToHScript(caseStr);
#if test

View File

@@ -514,7 +514,7 @@ class Reader {
name;
case RawHaxe(code):
// #| haxeCode() |#
'#| $code |#';
'#{ $code }#';
case RawHaxeBlock(code):
// #{ haxeCode(); moreHaxeCode(); }#
'#{ $code }#';

View File

@@ -522,8 +522,9 @@ From:[(assert false (+ \"false \" \"should \" \"have \" \"been \" \"true\"))]" m
(Assert.equals 5 (assertLet [(Some thing) some5] thing))))
(function _testRawString []
(Assert.equals #| "\\" |# #"\"#)
(Assert.equals #| "\"#" |# ##""#"##))
// Test escaped back slash with the raw haxe non-espaced backslash
(Assert.equals "\\" #"\"#)
(Assert.equals "\"#" ##""#"##))
(function _testKissStrings []
(Assert.equals #| "\\\t\r\n\"$" |# "\\\t\r\n\"\$")

View File

@@ -16,7 +16,7 @@
(var mySum (pluppers fluffers buffers))
// Read b c directly as strings
(defReaderMacro ["b" "c"] [stream] #|ReaderExp.StrExp(stream.expect("b, or c", function () stream.takeChars(1)))|#)
(defReaderMacro ["b" "c"] [stream] #{ReaderExp.StrExp(stream.expect("b, or c", function () stream.takeChars(1)))}#)
(var str1 b)
(var str2 c)