python-starlark-go
python-starlark-go copied to clipboard
Access syntax tree?
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 *
.