()
| 58309 | } |
| 58310 | |
| 58311 | function parseAtom() { |
| 58312 | // Atom :: |
| 58313 | // PatternCharacter |
| 58314 | // . |
| 58315 | // \ AtomEscape |
| 58316 | // CharacterClass |
| 58317 | // ( Disjunction ) |
| 58318 | // ( ? : Disjunction ) |
| 58319 | |
| 58320 | var res; |
| 58321 | |
| 58322 | // jviereck: allow ']', '}' here as well to be compatible with browser's |
| 58323 | // implementations: ']'.match(/]/); |
| 58324 | // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) { |
| 58325 | if (res = matchReg(/^[^^$\\.*+?(){[|]/)) { |
| 58326 | // PatternCharacter |
| 58327 | return createCharacter(res); |
| 58328 | } else if (match('.')) { |
| 58329 | // . |
| 58330 | return createDot(); |
| 58331 | } else if (match('\\')) { |
| 58332 | // \ AtomEscape |
| 58333 | res = parseAtomEscape(); |
| 58334 | if (!res) { |
| 58335 | bail('atomEscape'); |
| 58336 | } |
| 58337 | return res; |
| 58338 | } else if (res = parseCharacterClass()) { |
| 58339 | return res; |
| 58340 | } else { |
| 58341 | // ( Disjunction ) |
| 58342 | // ( ? : Disjunction ) |
| 58343 | return parseGroup('(?:', 'ignore', '(', 'normal'); |
| 58344 | } |
| 58345 | } |
| 58346 | |
| 58347 | function parseUnicodeSurrogatePairEscape(firstEscape) { |
| 58348 | if (hasUnicodeFlag) { |
no test coverage detected