language-python icon indicating copy to clipboard operation
language-python copied to clipboard

Documentation request: Python AST

Open dopatraman opened this issue 5 years ago • 1 comments

Is it possible to document the target AST? Would help while contributing.

Not sure on the format most folks would find useful -- personally, I'd be a fan of a JSON blob where:

x = 1

is represented by

{
    "type": "expression",
    "operator": "assignment",
    "variable": "x",
    "value": "1"
}

Would this be useful for anyone?

dopatraman avatar Mar 13 '19 23:03 dopatraman

I think documentation in the form of some examples would be very helpful, yes.

Can it be done with normal Haddock style comments in the source code? https://github.com/bjpop/language-python/blob/master/src/Language/Python/Common/AST.hs

I'm not sure about the JSON style. Perhaps you can elaborate on why that would be a good way to do it?

I would be very happy to accept pull requests for documentation.

bjpop avatar Mar 14 '19 00:03 bjpop