I'm not talking about extending Espruino at all here... I can want a way to tell someone else's minifier that a value isn't going to change.
I guess I could pre-parse the code, detect the pattern var DBG = true/false; at the beginning, and then search/replace DBG with the actual value before passing the code to the minifier. It's pretty ugly though.
var DBG = true/false;
© Espruino, powered by microcosm.
Report a problem