| 334 | |
| 335 | |
| 336 | static int singlematch(MatchState *ms, const char *s, const char *p, |
| 337 | const char *ep) { |
| 338 | if (s >= ms->src_end) |
| 339 | return 0; |
| 340 | else { |
| 341 | int c = uchar(*s); |
| 342 | switch (*p) { |
| 343 | case '.': return 1; /* matches any char */ |
| 344 | case L_ESC: return match_class(c, uchar(*(p + 1))); |
| 345 | case '[': return matchbracketclass(c, p, ep - 1); |
| 346 | default: return (uchar(*p) == c); |
| 347 | } |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | |
| 352 | static const char *matchbalance(MatchState *ms, const char *s, |
no test coverage detected