HaxeFoundation / HaxeFoundation/haxe
Implement language-independent source maps
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
It would help a lot to have source maps that are language-independent in a Haxe-specific file format.
My context is:
I'm compiling Haxe to Lua code, but unfortunately, unlike Javascript, Lua doesn't have an official source map format (Lua's approach is to embed all required debug information into the bytecode output). But since Haxe compiles to Lua code rather than Lua bytecode, there's currently no way of getting a connection between Haxe and Lua.
Therefore, my suggestion is to generate a universal source map that I can use as a developer to handle error messages myself. In case of Lua, I can for example use Lua's debug library in conjunction with `pcall` to catch errors and the source map to map the line numbers correctly.
Contributor guide
Assessment
This issue has not been assessed yet.