From 75958614871dc316759f826d0f82b26442bbc03b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 24 Nov 2021 15:47:34 +0800 Subject: resolve #655 --- script/parser/guide.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'script/parser') 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 -- cgit v1.2.3