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

Method isCharClass

java/com/google/re2j/Parser.java:1184–1189  ·  view source on GitHub ↗
(Regexp re)

Source from the content-addressed store, hash-verified

1182 // can this be represented as a character class?
1183 // single-rune literal string, char class, ., and .|\n.
1184 private static boolean isCharClass(Regexp re) {
1185 return ((re.op == Regexp.Op.LITERAL && re.runes.length == 1)
1186 || re.op == Regexp.Op.CHAR_CLASS
1187 || re.op == Regexp.Op.ANY_CHAR_NOT_NL
1188 || re.op == Regexp.Op.ANY_CHAR);
1189 }
1190
1191 // does re match r?
1192 private static boolean matchRune(Regexp re, int r) {

Callers 2

factorMethod · 0.95
swapVerticalBarMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected