vipercard
vipercard copied to clipboard
Chevrotain CST creation and content security policy.
Hello. 😄 I saw this comment:
The issue with content security policy (new Function) was resolved in version 3 https://github.com/SAP/chevrotain/blob/master/CHANGELOG.md#300-2-23-2018
But there have been many breaking changes since 0.34 so an upgrade would require a time investment.
Thank you for notifying me, I have been focusing on so many other things that I didn't see that the new version was released.
If the new version is faster, it might be worth upgrading :) . (I don't have any complaints about the speed, though, I have been very impressed with Chevrotain's speed.) I use a Python script to generate my grammar, and so changes in that area I could accommodate fairly quickly.
I'm the one who submitted a PR for the issue so the update probably contains my code :)
Leaving this issue open until I look what the new version of Chevrotain offers.
have been focusing on so many other things that I didn't see that the new version was released.
Try integrating with greenkeeper to monitor dependency updates.
I use a Python script to generate my grammar, and so changes in that area I could accommodate fairly quickly
There have also been breaking changes to the CST structure/Visitor and even the way tokens have been defined. 😢
If you do meta programming (generating the grammar) you may be interested in the support for custom grammar apis it includes code generation APIs.
I'm the one who submitted a PR for the issue so the update probably contains my code
Almost, you brought the problem to my attention 👍 , but the solution was to simplify the CST structure and avoid the empty arrays for unmatched [non]Terminals. So the optimizations were no longer needed during CST initialization.
if the new version is faster, it might be worth upgrading
The main upgrade is the CST creation optimization There is also another very large lexer performance upgrade that will be released soon. As the library is actively developed, its best to upgrade before the delta of breaking changes gets too large. 😄
Version 3.1 is out now with large lexer performance boost. (e.g, 60% for CSS grammar).
With the combined performance of multiple optimizations it is even possible you would get X2 the performance by upgrading...