(delim)
| 1366 | } |
| 1367 | |
| 1368 | function parse_string(delim) { |
| 1369 | style = 'string'; |
| 1370 | push_state(delim); |
| 1371 | while (i < n) { |
| 1372 | c = str[i++]; |
| 1373 | if (c == '\n') { |
| 1374 | style = 'error'; |
| 1375 | continue; |
| 1376 | } |
| 1377 | if (c == '\\') { |
| 1378 | if (i >= n) |
| 1379 | break; |
| 1380 | i++; |
| 1381 | } else |
| 1382 | if (c == delim) { |
| 1383 | pop_state(); |
| 1384 | break; |
| 1385 | } |
| 1386 | } |
| 1387 | } |
| 1388 | |
| 1389 | function parse_regex() { |
| 1390 | style = 'regex'; |
no test coverage detected