summaryrefslogtreecommitdiff
path: root/script/parser/guide.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r--script/parser/guide.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 54e61e7f..d55ba099 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)
+ 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