-
Notifications
You must be signed in to change notification settings - Fork 20
jsDump bug #5
Comments
The problem is that jsDump is using perfectly wrong approach of sniffing object's properties, and doesn't rely on types at all. The correct solution is described here (http://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/). Hotfix pushed to my fork, though we'd better look for another solution like running pegjs into js.js (https://github.com/jterrace/js.js), so that return value will be consistent, and there will be Function.prototype.toSource support in any browser (though, 200 times slowlier :). |
According to this post this bug can be fixed by using a jsDump fork. |
Hmm, I thought upgrading jsDump solved the problem, but it did that only for
With empty input, it produces |
I reported the bug at the jsDump fork the website uses and provided a PR with a fix. I’ll apply the fix locally too. |
The following grammar entered into the online version:
produces output
[]
for an empty input, instead of correct{ item: 'abc' }
.The following grammars don't have this problem:
Debugging points to a bug in the jsDump library. I need to look whether this is fixed in a newer version. If not, I need to report it/fix it.
Originally reported in the Google Group.
The text was updated successfully, but these errors were encountered: