()
| 58175 | } |
| 58176 | |
| 58177 | function parseTerm() { |
| 58178 | // Term :: |
| 58179 | // Anchor |
| 58180 | // Atom |
| 58181 | // Atom Quantifier |
| 58182 | |
| 58183 | if (pos >= str.length || current('|') || current(')')) { |
| 58184 | return null; /* Means: The term is empty */ |
| 58185 | } |
| 58186 | |
| 58187 | var anchor = parseAnchor(); |
| 58188 | |
| 58189 | if (anchor) { |
| 58190 | return anchor; |
| 58191 | } |
| 58192 | |
| 58193 | var atom = parseAtom(); |
| 58194 | if (!atom) { |
| 58195 | bail('Expected atom'); |
| 58196 | } |
| 58197 | var quantifier = parseQuantifier() || false; |
| 58198 | if (quantifier) { |
| 58199 | quantifier.body = flattenBody(atom); |
| 58200 | // The quantifier contains the atom. Therefore, the beginning of the |
| 58201 | // quantifier range is given by the beginning of the atom. |
| 58202 | updateRawStart(quantifier, atom.range[0]); |
| 58203 | return quantifier; |
| 58204 | } |
| 58205 | return atom; |
| 58206 | } |
| 58207 | |
| 58208 | function parseGroup(matchA, typeA, matchB, typeB) { |
| 58209 | var type = null, |
no test coverage detected