MCPcopy Create free account
hub / github.com/e2wugui/zeze / skipVar

Method skipVar

ZezeJava/ZezeJava/src/main/java/Zeze/Util/JsonReader.java:243–279  ·  view source on GitHub ↗
(int e)

Source from the content-addressed store, hash-verified

241 }
242
243 public int skipVar(int e) { // ']' or '}'
244 for (int b, c; ; ) {
245 if ((b = buf[pos]) == ',' || b == '\n')
246 for (; ; )
247 if (((((b = buf[++pos]) & 0xff) - ' ' - 1) ^ (',' - ' ' - 1)) > 0) { // (b & 0xff) > ' ' && b != ','
248 if (b != '/') // check comment
249 return b;
250 skipComment();
251 }
252 if (b == e)
253 return b;
254 pos++;
255 if (b < '"') // fast path
256 continue;
257 if (b == '"' || b == '\'') {
258 while ((c = buf[pos++]) != b)
259 if (c == '\\')
260 pos++;
261 } else if ((b | 0x20) == '{') { // [:0x5B | 0x20 = {:0x7B
262 for (int level = 0; (b = buf[pos++] | 0x20) != '}' || --level >= 0; ) { // ]:0x5D | 0x20 = }:0x7D
263 if (b == '"' || b == '\'') { // '"' = 0x22; '\'' = 0x27
264 while ((c = buf[pos++]) != b)
265 if (c == '\\')
266 pos++;
267 } else if (b == '{') // [:0x5B | 0x20 = {:0x7B
268 level++;
269 else if (b == '/') { // skip comment
270 pos--;
271 skipComment();
272 }
273 }
274 } else if (b == '/') { // skip comment
275 pos--;
276 skipComment();
277 }
278 }
279 }
280
281 private void skipComment() {
282 int b;

Callers 8

parseArray0Method · 0.95
parseArrayMethod · 0.95
parseMap0Method · 0.95
parse0Method · 0.95
parseList0Method · 0.95
GTable2Class · 0.80
GTable1Class · 0.80
JsonClass · 0.80

Calls 1

skipCommentMethod · 0.95

Tested by

no test coverage detected