jordwalke / jordwalke/vim-reasonml

Incorrect error locations for some syntax errors which refmt gets right

Open
#19 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Vim Script
Stars
111
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Tested with esy and Reason 3.4.0.

- [ ] Wrong arrow in pattern matching case (`->` instead of `=>`). `refmt` gets the error location correct.
```reason
let f = x =>
switch x {
| () -> /* Error should be at this arrow*/ ()
}; /* Error shows up at the end of the file */
```

- [ ] Incomplete function definition. `refmt` says there's an error at the start of line 2, which is reasonable. vim-reasonml marks the `l` in `let` and simply has the message `invalidCharacter.orComment.orString`
```reason
let f = x =>
```

- [ ] `let` where it doesn't belong. Same error/issue as the previous example.
```reason
let f = () =>
let
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the three Reason syntax-error examples in vim-reasonml and compare their reported locations with refmt, using the cases in the issue as the starting point. Trace the plugin's error-location handling for these inputs; done means each location matches the behavior described as correct for refmt.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.