diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-13 17:50:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-13 17:50:34 +0800 |
commit | f7e1257c803ecbdddf7d6b93be02fc45678b6a28 (patch) | |
tree | 0e243035b049579b37b5e0ebfa79f07576b4a8f5 | |
parent | 721fa266d37caad9dbcd60126816f9d85cef9b1e (diff) | |
download | lua-language-server-f7e1257c803ecbdddf7d6b93be02fc45678b6a28.zip |
fix #106 json解析支持注释
-rw-r--r-- | .vscode/settings.json | 9 | ||||
-rw-r--r-- | server-beta/src/json/decode.lua | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json index 098fc00a..04f1e5a9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,11 @@ +// Just some comment { - "Lua.diagnostics.globals": [ + "Lua.diagnostics.globals": [ // Just some comment + // Just some comment "ERR", "OUT", "IN", + // Just some comment "log", "ac", "_G", @@ -12,6 +15,7 @@ "Lua.diagnostics.disable": [ ], "Lua.runtime.version": "Lua 5.4", + // Just some comment "Lua.workspace.maxPreload": 400, "Lua.workspace.preloadFileSize": 1000, "Lua.workspace.ignoreDir": [ @@ -27,8 +31,9 @@ ], "Lua.workspace.library": { "E:/Github/test" : true, + // Just some comment "server/src/meta" : true }, "Lua.plugin.enable": true, - "Lua.zzzzzz.cat": true + //"Lua.zzzzzz.cat": true } diff --git a/server-beta/src/json/decode.lua b/server-beta/src/json/decode.lua index 9129d92f..36f8aa54 100644 --- a/server-beta/src/json/decode.lua +++ b/server-beta/src/json/decode.lua @@ -123,7 +123,7 @@ local Token = P { V'Value' * Cp(), Nl = P'\r\n' + S'\r\n', - Sp = S' \t', + Sp = S' \t' + '//' * (1-V'Nl')^0, Spnl = (V'Sp' + V'Nl')^0, Bool = C(P'true' + P'false') / BoolMap, Int = C('0' + (P'-'^-1 * R'19' * R'09'^0)) / tointeger, |