From 40b6da834d649828cea1a9f59b69657264a8c3c5 Mon Sep 17 00:00:00 2001 From: sumneko Date: Wed, 22 May 2019 18:12:58 +0800 Subject: =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=A4=84=E7=90=86=E5=BC=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/parser/grammar.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/src/parser/grammar.lua') 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: '='* :} {} '[' -- cgit v1.2.3