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

Method cat

java/com/google/re2j/Compiler.java:92–100  ·  view source on GitHub ↗
(Frag f1, Frag f2)

Source from the content-addressed store, hash-verified

90
91 // Given fragments a and b, returns ab; a|b
92 private Frag cat(Frag f1, Frag f2) {
93 // concat of failure is failure
94 if (f1.i == 0 || f2.i == 0) {
95 return fail();
96 }
97 // TODO(rsc): elide nop
98 prog.patch(f1.out, f2.i);
99 return new Frag(f1.i, f2.out, f1.nullable && f2.nullable);
100 }
101
102 // Given fragments for a and b, returns fragment for a|b.
103 private Frag alt(Frag f1, Frag f2) {

Callers 1

compileMethod · 0.95

Calls 2

failMethod · 0.95
patchMethod · 0.80

Tested by

no test coverage detected