privacy-scaling-explorations / chiquito

DSL for Halo2 circuits
https://docs.pecadorplonkish.xyz/
161 stars 36 forks source link

Fix definition references for declarations #262

Closed alxkzmn closed 1 week ago

alxkzmn commented 2 weeks ago

There was a small issue with how we were recording the definition references for declarations. We were counting the whole entry of the AST as its definition. For example, here:

state new_state {
...
}

the definition start was the start of the word "state" and the end was the closing curly bracket. This PR fixes the definition references to be the span of the identifier (in this example, just the new_state). Benefits: