tree-hugger
tree-hugger copied to clipboard
Can we make parsers stateless?
Right now Parser objects are stateful (in a sense that each obejct keep the parse tree internally and also the raw code and all, of the file / code string that it parsed last)
Questions
-
Is it necessary to make them stateless (imagine creating a single parser and using it in parallel on multiple files using a thread or multi-process based architecture)
-
If the answer to the above is
Yes
then how do we do that?
This may need a significant re-design of tree-hugger works at the moment. So, if we do that we need to keep in mind that we must not break backward compatibility.