Commit ed658ee
committed
Fix loop in parser
I noted a case in Metals where the compiler would keep running at 100+ % until the process was killed.
Using jstack I tracked it down to an infinite `skip` caused by a `syntaxError` in `pattern3`. In fact,
the syntaxError should not skip at this point since the offending expression was already fully parsed.
I fixed this in this commit.
The parser was invoked from the `signatureHelp` method. It seems it parsed something that was not
syntactically correct (specifically, a postfix `*` appeared in a pattern where none was allowed).
`1 parent cec9aa3 commit ed658ee
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2745 | 2745 | | |
2746 | 2746 | | |
2747 | 2747 | | |
2748 | | - | |
2749 | | - | |
2750 | | - | |
2751 | | - | |
2752 | | - | |
2753 | | - | |
2754 | | - | |
2755 | | - | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
| 2752 | + | |
| 2753 | + | |
| 2754 | + | |
2756 | 2755 | | |
2757 | 2756 | | |
2758 | 2757 | | |
| |||
0 commit comments