Open
Description
The highlighting for some expressions currently looks like this:
>>> 0.to(100).exists(x => x == x)
syntax error: <input>:0:1 - error: Conflicting definitions found for name x in module __REPL
0: val x = 1
^^^^^^^^^
<input>:2:18 - error: Conflicting definitions found for name x in module __REPL
2: 0.to(100).exists(x => x == x)
^^^^^^^^^^^
where it should be
>>> 0.to(100).exists(x => x == x)
syntax error: <input>:0:1 - error: Conflicting definitions found for name x in module __REPL
0: val x = 1
^
<input>:2:18 - error: Conflicting definitions found for name x in module __REPL
2: 0.to(100).exists(x => x == x)
^
We should make sure that IR sub-components also get an ID and a source map entry so we can point to them when reporting errors. In this case, we want to highlight a definition's name and a lambda parameter, both of which don't get their own IDs.
Originated from #464