| 293 | } |
| 294 | |
| 295 | Regexp* Regexp::Capture(Regexp* sub, ParseFlags flags, int cap) { |
| 296 | Regexp* re = new Regexp(kRegexpCapture, flags); |
| 297 | re->AllocSub(1); |
| 298 | re->sub()[0] = sub; |
| 299 | re->cap_ = cap; |
| 300 | return re; |
| 301 | } |
| 302 | |
| 303 | Regexp* Regexp::Repeat(Regexp* sub, ParseFlags flags, int min, int max) { |
| 304 | Regexp* re = new Regexp(kRegexpRepeat, flags); |