diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-24 15:47:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-24 15:47:34 +0800 |
commit | 75958614871dc316759f826d0f82b26442bbc03b (patch) | |
tree | 27c24f843a23ada283cc5bd9ef3c2ff07ae1f58c /script/parser | |
parent | 90d2f4190567891a2497cee80186657d416b19b0 (diff) | |
download | lua-language-server-75958614871dc316759f826d0f82b26442bbc03b.zip |
resolve #655
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/guide.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index b6cce241..54e61e7f 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -1151,4 +1151,14 @@ function m.isGlobal(source) return false end +function m.isInString(ast, position) + return m.eachSourceContain(ast, position, function (source) + if source.type == 'string' + and source.start < position then + return true + end + end) +end + + return m |