diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-23 21:42:30 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-23 21:42:30 +0800 |
commit | e797be175f99c280b41f629014dcc8dcbf013756 (patch) | |
tree | 8879d0e00bd4c079ed8461354e1ba23d173ebecb | |
parent | a4d7980a4d648b2baf54a6adefb1758d037424b3 (diff) | |
download | lua-language-server-e797be175f99c280b41f629014dcc8dcbf013756.zip |
增加lpeg堆栈上限
-rw-r--r-- | server/src/parser/grammar.lua | 2 |
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) |