When I call `alasql` with ``` js console.log(alasql("VALUE OF SELECT ASCII('\\');")) ``` I expect to get `92` (char value of `\`) but instead I get ``` Uncaught SyntaxError: Unexpected token )(…) yy.Select.compileSelect2 @ alasql.js:8970 yy.Select.compile @ alasql.js:7228 alasql.dexec @ alasql.js:4225 alasql.exec @ alasql.js:4190 alasql @ alasql.js:121 ``` The problem is that a generated function does not keep the escaped syntax `\\` and end up looking like this ``` js (function(p,params,alasql /**/) { var y;var r={'ASCII(\'\\')':(y=alasql.stdfn.ASCII('\'),y===y?y:undefined)};return r }) ``` Where the problem is the `ASCII('\')` part where the string never ends as the last `'` is escaped. I have tried to make it work by changing how `utils.escapeq` escapes the string but kept introducing errors in our `npm test`. I have a feeling it has to do with `yy.StringValue.prototype.toJS` but I dont have the detailed insights of the src yet to fix this one...
Activity