()
| 1143 | } |
| 1144 | |
| 1145 | function scanRegExp() { |
| 1146 | var start, body, flags, pattern, value; |
| 1147 | |
| 1148 | lookahead = null; |
| 1149 | skipComment(); |
| 1150 | start = index; |
| 1151 | |
| 1152 | body = scanRegExpBody(); |
| 1153 | flags = scanRegExpFlags(); |
| 1154 | value = testRegExp(body.value, flags.value); |
| 1155 | |
| 1156 | if (extra.tokenize) { |
| 1157 | return { |
| 1158 | type: Token.RegularExpression, |
| 1159 | value: value, |
| 1160 | lineNumber: lineNumber, |
| 1161 | lineStart: lineStart, |
| 1162 | start: start, |
| 1163 | end: index |
| 1164 | }; |
| 1165 | } |
| 1166 | |
| 1167 | return { |
| 1168 | literal: body.literal + flags.literal, |
| 1169 | value: value, |
| 1170 | start: start, |
| 1171 | end: index |
| 1172 | }; |
| 1173 | } |
| 1174 | |
| 1175 | function collectRegex() { |
| 1176 | var pos, loc, regex, token; |
no test coverage detected