diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-12 20:16:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-12 20:16:24 +0800 |
commit | 721fa266d37caad9dbcd60126816f9d85cef9b1e (patch) | |
tree | 26a55990cc7acc8e6ae739e8ec762bf73b0f5e88 /server/src/parser/ast.lua | |
parent | 4caf0cac1caf6e8567016424dfa103af27f097b7 (diff) | |
download | lua-language-server-721fa266d37caad9dbcd60126816f9d85cef9b1e.zip |
给 emmy 多行注释做个特殊处理
Diffstat (limited to 'server/src/parser/ast.lua')
-rw-r--r-- | server/src/parser/ast.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/server/src/parser/ast.lua b/server/src/parser/ast.lua index 3a91e42a..3d8b8ed8 100644 --- a/server/src/parser/ast.lua +++ b/server/src/parser/ast.lua @@ -1466,9 +1466,16 @@ local Defs = { return emmyName end, EmmyComment = function (...) + local lines = {...} + for i = 2, #lines do + local line = lines[i] + if line:sub(1, 1) == '|' then + lines[i] = '\n' .. line:sub(2) + end + end return { type = 'emmyComment', - [1] = table.concat({...}, '\n'), + [1] = table.concat(lines, '\n'), } end, EmmyOption = function (options) |