(matchA, typeA, matchB, typeB)
| 58206 | } |
| 58207 | |
| 58208 | function parseGroup(matchA, typeA, matchB, typeB) { |
| 58209 | var type = null, |
| 58210 | from = pos; |
| 58211 | |
| 58212 | if (match(matchA)) { |
| 58213 | type = typeA; |
| 58214 | } else if (match(matchB)) { |
| 58215 | type = typeB; |
| 58216 | } else { |
| 58217 | return false; |
| 58218 | } |
| 58219 | |
| 58220 | var body = parseDisjunction(); |
| 58221 | if (!body) { |
| 58222 | bail('Expected disjunction'); |
| 58223 | } |
| 58224 | skip(')'); |
| 58225 | var group = createGroup(type, flattenBody(body), from, pos); |
| 58226 | |
| 58227 | if (type == 'normal') { |
| 58228 | // Keep track of the number of closed groups. This is required for |
| 58229 | // parseDecimalEscape(). In case the string is parsed a second time the |
| 58230 | // value already holds the total count and no incrementation is required. |
| 58231 | if (firstIteration) { |
| 58232 | closedCaptureCounter++; |
| 58233 | } |
| 58234 | } |
| 58235 | return group; |
| 58236 | } |
| 58237 | |
| 58238 | function parseAnchor() { |
| 58239 | // Anchor :: |
no test coverage detected