summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-21 21:03:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-21 21:03:35 +0800
commit2f065aa49daf4f8116fe5ad1a2f991ce869b1f64 (patch)
tree4b6f45737ba867607402c831b8facd026d5ce850 /script
parentfe34846c98c7cb1f1fe000b3e4261056127ea595 (diff)
downloadlua-language-server-2f065aa49daf4f8116fe5ad1a2f991ce869b1f64.zip
fix runtime error
Diffstat (limited to 'script')
-rw-r--r--script/parser/luadoc.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 195ea815..e21e7c19 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -24,7 +24,8 @@ StringDef <- {'"'}
/ {"'"}
{~(Esc / !"'" .)*~} -> 1
("'"?)
- / {'[' {:eq: '='* :} '['}
+ / '[' {:eq: '='* :} '['
+ =eq -> LongStringMark
{(!StringClose .)*} -> 1
StringClose?
StringClose <- ']' =eq ']'
@@ -85,6 +86,9 @@ Symbol <- ({} {
end
return ''
end,
+ LongStringMark = function (back)
+ return '[' .. back .. '['
+ end,
Name = function (start, content, finish)
Ci = Ci + 1
TokenTypes[Ci] = 'name'