summaryrefslogtreecommitdiff
path: root/server/src/parser
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-18 14:03:12 +0800
committersumneko <sumneko@hotmail.com>2019-04-18 14:03:12 +0800
commit0699bff5ce3807964cda703ba00caa9dc5e90cf0 (patch)
treeb3e37c1f434f0963df0872cc6d170163f9d67822 /server/src/parser
parent10680f1a44f92aa0cd32db5e3bb1960bdbb29a25 (diff)
downloadlua-language-server-0699bff5ce3807964cda703ba00caa9dc5e90cf0.zip
更新LuaParser与语法解析
Diffstat (limited to 'server/src/parser')
-rw-r--r--server/src/parser/grammar.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index c2d2a2a5..7c29881b 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -509,7 +509,8 @@ Emmy <- '---@'
]]
grammar 'Emmy' [[
-Emmy <- '---@' EmmyBody ShortComment %nl*
+Emmy <- EmmySp '---@' EmmyBody ShortComment
+EmmySp <- (!'---@' Comment / %s / %nl)*
EmmyBody <- 'class' %s+ EmmyClass -> EmmyClass
/ 'type' %s+ EmmyType -> EmmyType
/ 'alias' %s+ EmmyAlias -> EmmyAlias