MCPcopy Create free account
hub / github.com/node-inspector/node-inspector / next_token

Function next_token

front-end/UglifyJS/parse-js.js:523–538  ·  view source on GitHub ↗
(force_regexp)

Source from the content-addressed store, hash-verified

521 };
522
523 function next_token(force_regexp) {
524 if (force_regexp)
525 return read_regexp();
526 skip_whitespace();
527 start_token();
528 var ch = peek();
529 if (!ch) return token("eof");
530 if (is_digit(ch)) return read_num();
531 if (ch == '"' || ch == "'") return read_string();
532 if (HOP(PUNC_CHARS, ch)) return token("punc", next());
533 if (ch == ".") return handle_dot();
534 if (ch == "/") return handle_slash();
535 if (HOP(OPERATOR_CHARS, ch)) return read_operator();
536 if (is_identifier_char(ch)) return read_word();
537 parse_error("Unexpected character '" + ch + "'");
538 };
539
540 next_token.context = function(nc) {
541 if (nc) S = nc;

Callers 1

handle_slashFunction · 0.85

Calls 15

read_regexpFunction · 0.85
skip_whitespaceFunction · 0.85
start_tokenFunction · 0.85
peekFunction · 0.85
tokenFunction · 0.85
is_digitFunction · 0.85
read_numFunction · 0.85
read_stringFunction · 0.85
HOPFunction · 0.85
nextFunction · 0.85
handle_dotFunction · 0.85
handle_slashFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…