no-context / moo

Optimised tokenizer/lexer generator! 🐄 Uses /y for performance. Moo.
BSD 3-Clause "New" or "Revised" License
814 stars 65 forks source link

Deprecation of method has and impact on Nearley parser #158

Open houghtonap opened 3 years ago

houghtonap commented 3 years ago

In version 0.5.0, it appears that moo deprecated method has and it now always returns true. Since the Nearley parser uses method has, the code it generates now always succeeds producing incorrect results. While I do understand that the moo project has a right to deprecate their interfaces, I'm wondering whether the impact to the Nearley parser was taken into consideration? Also, what was the reason for deprecation of the method has, for example, did it not work correctly in the update from v0.4.3 to v0.5.0 hence it's deprecation because moo internals changed and it could no longer be supported? Would the v0.4.3 code for the method has still work, if I hacked it back into the source for the latest version of moo? Thx.

tjvr commented 3 years ago

Hey! You can see more context on this change here: #85