github / semantic

Parsing, analyzing, and comparing source code across many languages
8.94k stars 454 forks source link

Python Bindings #617

Closed bdrodes closed 4 years ago

bdrodes commented 4 years ago

Is there a way to easily ingest and manipulate a semantic AST in python? I realize I can walk the json generated by semantic, but I was hoping there was mechanism to modify/insert nodes into an existing semantic-produced AST through a python API.

patrickt commented 4 years ago

We don’t have any plans to provide APIs in languages other than Haskell, due to the time and effort associated with maintaining binding quality, and the fact that we’re focused on writing new analyses these days. It’s possible that a bindings tool like hyphen might help you, though I haven’t used it and can’t speak to its quality.