tree-hugger
tree-hugger copied to clipboard
Add a factory function to generate the proper paerser object
As an alternative to doing this
from tree_hugger.core import PythonParser
pp = PythonParser()
We also suggest having something like this
from tree_hugger.language_factory import get_parser
pp = get_parser('Python')
As most of the parsers expose a very similar API so having a factory makes sense in this regard.