Skip to content

Commit e8088a9

Browse files
committed
move broken parser cases to its own file
1 parent 16d713b commit e8088a9

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// --- BROKEN PARSER CASES ---
2+
// This below demonstrates an issue when what you're completing is the _last_ labelled argument, and there's a unit application after it. The parser wrongly merges the unit argument as the expression of the labelled argument assignment, where is should really let the trailing unit argument be, and set a %rescript.exprhole as the expression of the assignment, just like it normally does.
3+
// let _ = someFn(~isOff=, ())
4+
// ^com
5+

analysis/tests/src/CompletionFunctionArguments.res

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,3 @@ let someFnTakingVariant = (
6969

7070
// let _ = 1->someOtherFn(1, t)
7171
// ^com
72-
73-
// --- BROKEN PARSER CASES ---
74-
// This below demonstrates an issue when what you're completing is the _last_ labelled argument, and there's a unit application after it. The parser wrongly merges the unit argument as the expression of the labelled argument assignment, where is should really let the trailing unit argument be, and set a %rescript.exprhole as the expression of the assignment, just like it normally does.
75-
// let _ = someFn(~isOff=, ())
76-
// ^com
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Complete src/BrokenParserCases.res 2:25
2+
posCursor:[2:25] posNoWhite:[2:24] Found expr:[2:11->2:30]
3+
Pexp_apply ...[2:11->2:17] (~isOff2:19->2:24=...[2:27->2:29])
4+
Completable: Cargument Value[someFn]($0)
5+
[]
6+

analysis/tests/src/expected/CompletionFunctionArguments.res.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,3 @@ Completable: Cargument Value[someOtherFn]($2=t)
211211
"documentation": null
212212
}]
213213

214-
Complete src/CompletionFunctionArguments.res 74:25
215-
posCursor:[74:25] posNoWhite:[74:24] Found expr:[74:11->74:30]
216-
Pexp_apply ...[74:11->74:17] (~isOff74:19->74:24=...[74:27->74:29])
217-
Completable: Cargument Value[someFn]($0)
218-
[]
219-

0 commit comments

Comments
 (0)