emscripten
emscripten copied to clipboard
Perform cDefs/cStructs macro substitution using acorn pass
Rather than depending on the JS pre-processor we can achieve better results using and acorn pass. Some upsides of doing it this way are:
- Better syntax highlighing since JS library files are closer to normal JS.
- Less noise in input files.
In debug builds include the cDefs/cStructs mappings in the generated code. In release builds we use acorn to replace all occurrences of cDefs/cStructs.
This is just a draft for now.
To see what it looks like when we use this new technique in our JS library code 3ea9b6a15