Open 0dminnimda opened 2 years ago
I would be interested in such a feature. And I could help review a PR.
Wonderful!
I forgot that right now cython does not support walrus operator, so for this change to be work at all we will probably need to merge this branch as well.
If the creation of a parser using c was prohibited, because the original cpython pegen used too much internal functionality, then we can at least make python parser faster with cython.
Since pegen knows all the variables and types that users provide, it can use this information to create a
.pxd
file. This file will not interfere with pure python parser work, but it can be used by cython to create a faster compiled version of the parser.I will implement this functionality anyway, but I wonder should I make it into PR and try to merge it here? Is this feature needed here?