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

Method parseVerticalBar

java/com/google/re2j/Parser.java:1212–1222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1210
1211 // parseVerticalBar handles a | in the input.
1212 private void parseVerticalBar() {
1213 concat();
1214
1215 // The concatenation we just parsed is on top of the stack.
1216 // If it sits above an opVerticalBar, swap it below
1217 // (things below an opVerticalBar become an alternation).
1218 // Otherwise, push a new vertical bar.
1219 if (!swapVerticalBar()) {
1220 op(Regexp.Op.VERTICAL_BAR);
1221 }
1222 }
1223
1224 // mergeCharClass makes dst = dst|src.
1225 // The caller must ensure that dst.Op >= src.Op,

Callers 1

parseInternalMethod · 0.95

Calls 3

concatMethod · 0.95
swapVerticalBarMethod · 0.95
opMethod · 0.95

Tested by

no test coverage detected