haxe-rename
haxe-rename copied to clipboard
Parsing a `return macro @:pos` crashes the parser
👋 Hello,
given a macro like this:
class TestCrashMacro {
static function combine(structure:Expr):Expr {
if (structure.expr.match(EDisplay(_, DKMarked))) {
return macro @:pos(Context.currentPos()) ($structure : {});
}
return Expr();
}
}
will crash rename.js when parsing @:pos
.
haxe_ValueException [Error]: failed to parse src/SecondRenameCrash.hx - Exception: invalid token tree structure - found:[@] Called from tokentree_walk_WalkTypedefBody.walkTypedefCurlyBody (rename.js line 12750 column 26)