LuaLS / LuaLS/lua-language-server
Redundant "Unable to execute code after break" diagnostic is given when using a label after a break
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
### How are you using the lua-language-server?
Kakoune
### Which OS are you using?
Linux
### What is the issue affecting?
Diagnostics/Syntax Checking
### Expected Behaviour
No diagnostic is given.
### Actual Behaviour
A diagnostic `Unable to execute code after 'break'` is given, even though the only thing after the `break` is a label.

### Reproduction steps
Reproducible with the following code:
```lua
for i = 1, 10 do
if i < 8 then
print(i)
goto continue
end
break
::continue::
end
```
### Additional Notes
_No response_
### Log File
The log isn't very relevant in this case but here it is anyway.
[luals.log](https://github.com/LuaLS/lua-language-server/files/15503586/luals.log)
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Diagnostics/Syntax Checking 下的 Lua 重現開始,並在 Linux 上透過 Kakoune 中的語言伺服器執行它。追蹤診斷 `Unable to execute code after 'break'` 的產生位置,然後確認當後續唯一的陳述式是 `::continue::` 標籤時,該診斷不存在。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- devtools
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100