diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2023-03-08 21:17:43 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2023-03-08 21:17:43 +0800 |
commit | 48a3aab6e3becb5127ad467964c44f19187cac35 (patch) | |
tree | 87cbce0f6523c60100fbd69e4c9621120ba67d17 /script/parser | |
parent | f462813bee496adb2613389b0bfbb3e558617916 (diff) | |
download | lua-language-server-48a3aab6e3becb5127ad467964c44f19187cac35.zip |
don't treat `_ENV` as param
fix #1715
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/guide.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index ec5746c1..e7eb3751 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1276,4 +1276,17 @@ function m.getTopBlock(source) return nil end +---@param source parser.object +---@return boolean +function m.isParam(source) + if source.type ~= 'local' + and source.type ~= 'self' then + return false + end + if source.parent.type ~= 'funcargs' then + return false + end + return true +end + return m |