Finishes the current alternation, collapsing it to a single regexp on the stack.
| 1255 | // Finishes the current alternation, |
| 1256 | // collapsing it to a single regexp on the stack. |
| 1257 | void Regexp::ParseState::DoAlternation() { |
| 1258 | DoVerticalBar(); |
| 1259 | // Now stack top is kVerticalBar. |
| 1260 | Regexp* r1 = stacktop_; |
| 1261 | stacktop_ = r1->down_; |
| 1262 | r1->Decref(); |
| 1263 | DoCollapse(kRegexpAlternate); |
| 1264 | } |
| 1265 | |
| 1266 | // Incremental conversion of concatenated literals into strings. |
| 1267 | // If top two elements on stack are both literal or string, |