autosoft-dev / autosoft-dev/tree-hugger
Add a factory function to generate the proper paerser object
- Dominant language
- Python
- Stars
- 132
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by inspecting the parser classes exposed through tree_hugger.core and the proposed tree_hugger.language_factory entry point. Confirm how parser names map to classes, then verify that get_parser('Python') returns the equivalent parser object and that its API matches direct PythonParser construction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100