(force_regexp)
| 598 | }; |
| 599 | |
| 600 | function next_token(force_regexp) { |
| 601 | if (force_regexp != null) |
| 602 | return read_regexp(force_regexp); |
| 603 | skip_whitespace(); |
| 604 | start_token(); |
| 605 | var ch = peek(); |
| 606 | if (!ch) return token("eof"); |
| 607 | if (is_digit(ch)) return read_num(); |
| 608 | if (ch == '"' || ch == "'") return read_string(); |
| 609 | if (HOP(PUNC_CHARS, ch)) return token("punc", next()); |
| 610 | if (ch == ".") return handle_dot(); |
| 611 | if (ch == "/") return handle_slash(); |
| 612 | if (HOP(OPERATOR_CHARS, ch)) return read_operator(); |
| 613 | if (ch == "\\" || is_identifier_start(ch)) return read_word(); |
| 614 | parse_error("Unexpected character '" + ch + "'"); |
| 615 | }; |
| 616 | |
| 617 | next_token.context = function(nc) { |
| 618 | if (nc) S = nc; |
no test coverage detected