warning message for old raw haxe add semicolon

This commit is contained in:
2022-06-06 15:59:42 +00:00
parent 5b9e33b321
commit dd998372e2

View File

@@ -72,7 +72,10 @@ class Reader {
var pos = stream.position();
var haxe = stream.expect("closing |#", () -> stream.takeUntilAndDrop("|#"));
var def = RawHaxe(haxe);
KissError.warnFromExp(def.withPos(pos), '#|rawHaxe()|# expressions are deprecated because they only parse one statement and ignore the rest. Try this: #{$haxe}#');
var haxeWithSemi = haxe.trim();
if (!haxeWithSemi.endsWith(";"))
haxeWithSemi += ";";
KissError.warnFromExp(def.withPos(pos), '#|rawHaxe()|# expressions are deprecated because they only parse one statement and ignore the rest. Try this: #{$haxeWithSemi}#');
def;
};