forked from erlang-ls/erlang_ls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[erlang-ls#1337] Make goto variable definition respect list comprehen…
…sion scopes (erlang-ls#1403)
- Loading branch information
1 parent
80e9f5f
commit ddc8cc2
Showing
5 changed files
with
256 additions
and
27 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
apps/els_lsp/priv/code_navigation/src/variable_list_comp.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-module(variable_list_comp). | ||
|
||
one() -> | ||
Var = 1, | ||
[ Var || Var <- [1, 2, 3] ], | ||
Var. | ||
|
||
two() -> | ||
[ Var || Var <- [1, 2, 3] ], | ||
[ Var || Var <- [4, 5, 6] ]. | ||
|
||
three() -> | ||
Var = 1, | ||
[ Var || _ <- [1, 2, 3] ], | ||
Var. | ||
|
||
four() -> | ||
[ {Var, Var2} || Var <- [4, 5, 6], | ||
Var2 <- [ Var || Var <- [1, 2, 3] ] | ||
]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters