warning message for old raw haxe add semicolon

This commit is contained in:
2022-06-06 15:59:42 +00:00
parent 2c7a26a792
commit b21ce5aa38

View File

@@ -72,7 +72,10 @@ class Reader {
var pos = stream.position(); var pos = stream.position();
var haxe = stream.expect("closing |#", () -> stream.takeUntilAndDrop("|#")); var haxe = stream.expect("closing |#", () -> stream.takeUntilAndDrop("|#"));
var def = RawHaxe(haxe); 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; def;
}; };