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.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index a91a6f68..05827398 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1231,6 +1231,15 @@ function m.isInString(ast, position)
end)
end
+function m.isInComment(ast, offset)
+ for _, com in ipairs(ast.state.comms) do
+ if offset >= com.start and offset <= com.finish then
+ return true
+ end
+ end
+ return false
+end
+
function m.isOOP(source)
if source.type == 'setmethod'
or source.type == 'getmethod' then