summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-23 21:42:30 +0800
committersumneko <sumneko@hotmail.com>2019-04-23 21:42:30 +0800
commite797be175f99c280b41f629014dcc8dcbf013756 (patch)
tree8879d0e00bd4c079ed8461354e1ba23d173ebecb /server
parenta4d7980a4d648b2baf54a6adefb1758d037424b3 (diff)
downloadlua-language-server-e797be175f99c280b41f629014dcc8dcbf013756.zip
增加lpeg堆栈上限
Diffstat (limited to 'server')
-rw-r--r--server/src/parser/grammar.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index 00c3dbdb..dcc02ad0 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -70,6 +70,8 @@ defs.Reserved = function (_, _, str)
end
defs.np = m.Cp() / function (n) return n+1 end
+m.setmaxstack(1000)
+
local eof = re.compile '!. / %{SYNTAX_ERROR}'
local function grammar(tag)