diff options
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r-- | script/parser/guide.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index c05c8255..439f5889 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -12,7 +12,7 @@ local type = type ---@field tag string ---@field args { [integer]: parser.object, start: integer, finish: integer } ---@field locals parser.object[] ----@field returns parser.object[] +---@field returns? parser.object[] ---@field exps parser.object[] ---@field keys parser.object[] ---@field uri uri @@ -1232,6 +1232,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 |