diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-12-06 20:02:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-12-06 20:02:08 +0800 |
commit | d060e870a5d24e3e575459a0e02d229d9234109a (patch) | |
tree | b04b4913015fc2c1888afe386d23a8e061eb53ca /script/parser/guide.lua | |
parent | b1a1b3f46771ac5461182a8156452517c280b153 (diff) | |
download | lua-language-server-d060e870a5d24e3e575459a0e02d229d9234109a.zip |
cleanup
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r-- | script/parser/guide.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 54e61e7f..ac773d44 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1160,5 +1160,17 @@ function m.isInString(ast, position) end) end +function m.isOOP(source, oop) + if source.type == 'setmethod' + or source.type == 'getmethod' then + return true + end + if source.type == 'method' + or source.type == 'field' + or source.type == 'function' then + return m.isOOP(source.parent) + end + return false +end return m |