Processes the end of input, returning the final regexp.
| 713 | |
| 714 | // Processes the end of input, returning the final regexp. |
| 715 | Regexp* Regexp::ParseState::DoFinish() { |
| 716 | DoAlternation(); |
| 717 | Regexp* re = stacktop_; |
| 718 | if (re != NULL && re->down_ != NULL) { |
| 719 | status_->set_code(kRegexpMissingParen); |
| 720 | status_->set_error_arg(whole_regexp_); |
| 721 | return NULL; |
| 722 | } |
| 723 | stacktop_ = NULL; |
| 724 | return FinishRegexp(re); |
| 725 | } |
| 726 | |
| 727 | // Returns the leading regexp that re starts with. |
| 728 | // The returned Regexp* points into a piece of re, |
no test coverage detected