forked from ocaml/merlin
-
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.
Backport: Correctly traverse patterns when itering for docs ocaml#1572
from voodoos/iter-on-whole-pattern-to-find-uids
- Loading branch information
Showing
3 changed files
with
134 additions
and
86 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
$ cat >main.ml <<EOF | ||
> let _ = Lib.y | ||
> EOF | ||
|
||
$ cat >lib.ml <<EOF | ||
> (** doc for all node *) | ||
> let x, y = 2, 3 | ||
> EOF | ||
|
||
$ $OCAMLC -c -bin-annot lib.ml main.ml | ||
|
||
$ $MERLIN single document -position 1:12 \ | ||
> -log-file - 2>log \ | ||
> -filename main.ml <main.ml | ||
{ | ||
"class": "return", | ||
"value": "doc for all node", | ||
"notifications": [] | ||
} | ||
|
||
We should not rely on the heuristic to get that comment | ||
$ cat log | grep -A 2 "looking around" | ||
[1] |