Skip to content

Access syntax tree? #174

@tadamcz

Description

@tadamcz

Great library, thanks so much for your work! I really appreciate e.g. how you've translated exceptions in a way that lets you easily access the line and column number of a Starlark error 👌.

Does Starlark provide a way to access the syntax tree of an expression? Is this something we could add to python-starlark-go? (If Starlark exposes the tree I'm happy to take a shot at it, but my go skills are very poor).

So, for example, in the Starlark code:

a = 1
b = 2
c = a * 2
result = b + c 

we could access the fact that result depends on b and c via the operator +, and in turn c depends on a (and a literal) via *.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions