Skip to content

squirrel: Fix some top-level symbols being considered locals

Warren Gifford requested to merge squirrel-fix-locals into main

Created by: chrismwendt

Prior to this change, https://sourcegraph.com/github.com/reddit/baseplate.go/-/blob/thriftbp/prometheus.go?L45:2#tab=references would return only 1 result because it was considered a local variable because the root node of the tree-sitter tree was always considered a valid scope that could contain locals.

After this change, the root node is no longer considered a local scope, so variables declared at the top-level are not considered locals, so the usual text search used to find references.

From Slack.

Test plan

Go tests

Merge request reports

Loading