Comparison

tools/ejabberdsql2prosody.lua @ 7565:2ef93ba18336

ejabberdsql2prosody: remove unused function pushback() [luacheck] The same function seems to exist in tools/erlparse.lua, also unused.
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 12 Aug 2016 13:29:27 +0800
parent 5993:ef11b8bab405
child 7566:e4f9c192b797
comparison
equal deleted inserted replaced
7561:ab8324d3b899 7565:2ef93ba18336
39 ch = file:read(1); 39 ch = file:read(1);
40 if ch == "\n" then line = line + 1; end 40 if ch == "\n" then line = line + 1; end
41 end 41 end
42 if expected and ch ~= expected then error("expected: "..expected.."; got: "..(ch or "nil").." on line "..line); end 42 if expected and ch ~= expected then error("expected: "..expected.."; got: "..(ch or "nil").." on line "..line); end
43 return ch; 43 return ch;
44 end
45 local function pushback(ch)
46 if last then error(); end
47 last = ch;
48 end 44 end
49 local function peek() 45 local function peek()
50 if not last then last = read(); end 46 if not last then last = read(); end
51 return last; 47 return last;
52 end 48 end