| 559 | }; |
| 560 | |
| 561 | int Regexp::NumCaptures() { |
| 562 | NumCapturesWalker w; |
| 563 | w.Walk(this, 0); |
| 564 | return w.ncapture(); |
| 565 | } |
| 566 | |
| 567 | // Walker class to build map of named capture groups and their indices. |
| 568 | class NamedCapturesWalker : public Regexp::Walker<Ignored> { |