(StringIterator t, int wholeClassPos)
| 1453 | // wholeClassPos is the position of the start of the entire class "[...". |
| 1454 | // Pre: t at class char; Post: t after it. |
| 1455 | private static int parseClassChar(StringIterator t, int wholeClassPos) |
| 1456 | throws PatternSyntaxException { |
| 1457 | if (!t.more()) { |
| 1458 | throw new PatternSyntaxException(ERR_MISSING_BRACKET, t.from(wholeClassPos)); |
| 1459 | } |
| 1460 | |
| 1461 | // Allow regular escape sequences even though |
| 1462 | // many need not be escaped in this context. |
| 1463 | if (t.lookingAt('\\')) { |
| 1464 | return parseEscape(t); |
| 1465 | } |
| 1466 | |
| 1467 | return t.pop(); |
| 1468 | } |
| 1469 | |
| 1470 | // parsePerlClassEscape parses a leading Perl character class escape like \d |
| 1471 | // from the beginning of |t|. If one is present, it appends the characters |
no test coverage detected