| 316 | } |
| 317 | |
| 318 | Regexp* Regexp::LiteralString(Rune* runes, int nrunes, ParseFlags flags) { |
| 319 | if (nrunes <= 0) |
| 320 | return new Regexp(kRegexpEmptyMatch, flags); |
| 321 | if (nrunes == 1) |
| 322 | return NewLiteral(runes[0], flags); |
| 323 | Regexp* re = new Regexp(kRegexpLiteralString, flags); |
| 324 | for (int i = 0; i < nrunes; i++) |
| 325 | re->AddRuneToString(runes[i]); |
| 326 | return re; |
| 327 | } |
| 328 | |
| 329 | Regexp* Regexp::NewCharClass(CharClass* cc, ParseFlags flags) { |
| 330 | Regexp* re = new Regexp(kRegexpCharClass, flags); |
nothing calls this directly
no test coverage detected