| 310 | |
| 311 | |
| 312 | static int readhexaesc (LexState *ls) { |
| 313 | int c[3], i; /* keep input for error message */ |
| 314 | int r = 0; /* result accumulator */ |
| 315 | c[0] = 'x'; /* for error message */ |
| 316 | for (i = 1; i < 3; i++) { /* read two hexadecimal digits */ |
| 317 | c[i] = next(ls); |
| 318 | if (!lisxdigit(c[i])) |
| 319 | escerror(ls, c, i + 1, "hexadecimal digit expected"); |
| 320 | r = (r << 4) + luaO_hexavalue(c[i]); |
| 321 | } |
| 322 | return r; |
| 323 | } |
| 324 | |
| 325 | |
| 326 | static int readdecesc (LexState *ls) { |
no test coverage detected