autosoft-dev / autosoft-dev/tree-hugger

Add a factory function to generate the proper paerser object

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.