Pushes a . onto the stack.
| 453 | |
| 454 | // Pushes a . onto the stack. |
| 455 | bool Regexp::ParseState::PushDot() { |
| 456 | if ((flags_ & DotNL) && !(flags_ & NeverNL)) |
| 457 | return PushSimpleOp(kRegexpAnyChar); |
| 458 | // Rewrite . into [^\n] |
| 459 | Regexp* re = new Regexp(kRegexpCharClass, flags_ & ~FoldCase); |
| 460 | re->ccb_ = new CharClassBuilder; |
| 461 | re->ccb_->AddRange(0, '\n' - 1); |
| 462 | re->ccb_->AddRange('\n' + 1, rune_max_); |
| 463 | return PushRegexp(re); |
| 464 | } |
| 465 | |
| 466 | // Pushes a regexp with the given op (and no args) onto the stack. |
| 467 | bool Regexp::ParseState::PushSimpleOp(RegexpOp op) { |