Closed kfarnung closed 6 years ago
Here's what I'm seeing with the latest NPM version:
> eshost -tse "3+4"
┌────────────────┬──────────────────────────────────────┐
│ V8 │ │
│ V8 --harmony │ SyntaxError: Unexpected end of input │
├────────────────┼──────────────────────────────────────┤
│ Chakra │ 7 │
│ JavaScriptCore │ │
│ SpiderMonkey │ │
│ XS │ │
└────────────────┴──────────────────────────────────────┘
With this fix:
> node .\bin\eshost.js -tse "3+4"
┌────────────────┬───┐
│ Chakra │ 7 │
│ JavaScriptCore │ │
│ SpiderMonkey │ │
│ V8 │ │
│ V8 --harmony │ │
│ XS │ │
└────────────────┴───┘
Squash merged: https://github.com/bterlson/eshost/commit/a0f16713b903292f966fcfd579b15cdc955b0429
Thanks!
The combination of #50 and #51 has resulted in the d8 runtime being invalid because the single-line comments remove all following code when newlines are removed.
The fix is to always build the AST and remove comments, regardless of whether the shortName is being replaced.