MCPcopy Create free account
hub / github.com/google/re2j / parseClassChar

Method parseClassChar

java/com/google/re2j/Parser.java:1455–1468  ·  view source on GitHub ↗
(StringIterator t, int wholeClassPos)

Source from the content-addressed store, hash-verified

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

Callers 1

parseClassMethod · 0.95

Calls 5

parseEscapeMethod · 0.95
moreMethod · 0.80
fromMethod · 0.80
lookingAtMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected