google / google/codeworld

Make variable highlighting aware of scope

Open
#1,225 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

Consider these function definitions:

```haskell
foo(x) = x + 1
bar(x) = x^2 + x + 2
```

If I put the cursor on one of the `x`s in `bar`, we should only highlight the other occurrences of the same variable (i.e., the other `x`s in `bar`), rather than also highlighting variables that happen to have the same name but aren't visible in the current scope (i.e., the `x`s in `foo`).

![image](https://user-images.githubusercontent.com/16061266/68100925-d2679a80-fe98-11e9-842c-1e3c9a1c4b3d.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.