summaryrefslogtreecommitdiff
path: root/server/src/parser/grammar.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-05-22 18:12:58 +0800
committersumneko <sumneko@hotmail.com>2019-05-22 18:12:58 +0800
commit40b6da834d649828cea1a9f59b69657264a8c3c5 (patch)
tree950888727a0016047d812b21832302511f863502 /server/src/parser/grammar.lua
parenta69fc879a80f05c7bf27e98d14462bb0a0cbde38 (diff)
downloadlua-language-server-40b6da834d649828cea1a9f59b69657264a8c3c5.zip
自动处理引号
Diffstat (limited to 'server/src/parser/grammar.lua')
-rw-r--r--server/src/parser/grammar.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index 455a71ca..54b03e24 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -242,10 +242,10 @@ Boolean <- Sp ({} -> True) TRUE
grammar 'String' [[
String <- Sp ({} StringDef {})
-> String
-StringDef <- '"'
+StringDef <- {'"'}
{~(Esc / !%nl !'"' .)*~} -> 1
('"' / {} -> MissQuote1)
- / "'"
+ / {"'"}
{~(Esc / !%nl !"'" .)*~} -> 1
("'" / {} -> MissQuote2)
/ ('[' {} {:eq: '='* :} {} '['