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) { for (matchBodySymbol in matchBodySymbols) {
caseInterp.variables.set(Prelude.symbolNameValue(matchBodySymbol), matchBodies.shift()); caseInterp.variables.set(Prelude.symbolNameValue(matchBodySymbol), matchBodies.shift());
} }
prepareForConditional(caseInterp, k);
try { try {
var hscriptStr = Prelude.convertToHScript(caseStr); var hscriptStr = Prelude.convertToHScript(caseStr);
#if test #if test

View File

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

View File

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

View File

@@ -16,7 +16,7 @@
(var mySum (pluppers fluffers buffers)) (var mySum (pluppers fluffers buffers))
// Read b c directly as strings // 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 str1 b)
(var str2 c) (var str2 c)