LuaLS / LuaLS/lua-language-server
hexdecimal literals not being parsed properly
未關閉
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Linux
What is the issue affecting?
Type Checking, Completion
Expected Behaviour
---@alias intent_value
---|0x1
---|0x2
---|0x4
---|0x8
---|0x10
---|0x20
---|0x40
---|0x80
---|0x100
---|0x200
---|0x400
---|0x800
---|0x1000
---|0x2000
---|0x4000
---|0x8000
---|0x10000
---|0x100000
---|0x200000
---@param t intent_value
local function a(t) end
a(<??>) -- expected suggestions: the hexadecimal literals
Actual Behaviour
Reproduction steps
- copy the above code
- try a completion for the
afunction.
Additional Notes
I am somewhat confused at this because... it is doing something but not exactly?
The linter seems to understand this is a numeric literal, but the language server seems to only take the 0 value, and the actual value seems to be treated as a comment instead of a value, probably because it is not parsing it properly?
Log File
No response
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從提供的 Lua 重現開始,檢查語言伺服器如何解析 @alias 中的十六進位值,並將其用於 a(...) 處的補全。在 Visual Studio Code 擴充功能中重現缺少的十六進位常值建議,然後驗證列出的值是否被辨識為不同的數值選項,以及型別檢查是否仍然接受 intent_value 引數。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- devtools
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100