Diff

util/json.lua @ 8382:e5d00bf4a4d5

util: Various minor changes to please [luacheck]
author Kim Alvefur <zash@zash.se>
date Fri, 10 Nov 2017 05:42:32 +0100
parent 7261:925f848c706d
child 8697:c60fdf148118
line wrap: on
line diff
--- a/util/json.lua	Fri Nov 10 05:34:29 2017 +0100
+++ b/util/json.lua	Fri Nov 10 05:42:32 2017 +0100
@@ -27,9 +27,6 @@
 local escapes = {
 	["\""] = "\\\"", ["\\"] = "\\\\", ["\b"] = "\\b",
 	["\f"] = "\\f", ["\n"] = "\\n", ["\r"] = "\\r", ["\t"] = "\\t"};
-local unescapes = {
-	["\""] = "\"", ["\\"] = "\\", ["/"] = "/",
-	b = "\b", f = "\f", n = "\n", r = "\r", t = "\t"};
 for i=0,31 do
 	local ch = s_char(i);
 	if not escapes[ch] then escapes[ch] = ("\\u%.4X"):format(i); end
@@ -249,7 +246,7 @@
 	end
 end
 local _unescape_error;
-local function _unescape_surrogate_func(x)
+local function _unescape_surrogate_func(x) -- luacheck: ignore
 	local lead, trail = tonumber(x:sub(3, 6), 16), tonumber(x:sub(9, 12), 16);
 	local codepoint = lead * 0x400 + trail - 0x35FDC00;
 	local a = codepoint % 64;