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

Function token

front-end/UglifyJS/parse-js.js:302–320  ·  view source on GitHub ↗
(type, value, is_comment)

Source from the content-addressed store, hash-verified

300 };
301
302 function token(type, value, is_comment) {
303 S.regex_allowed = ((type == "operator" && !HOP(UNARY_POSTFIX, value)) ||
304 (type == "keyword" && HOP(KEYWORDS_BEFORE_EXPRESSION, value)) ||
305 (type == "punc" && HOP(PUNC_BEFORE_EXPRESSION, value)));
306 var ret = {
307 type : type,
308 value : value,
309 line : S.tokline,
310 col : S.tokcol,
311 pos : S.tokpos,
312 nlb : S.newline_before
313 };
314 if (!is_comment) {
315 ret.comments_before = S.comments_before;
316 S.comments_before = [];
317 }
318 S.newline_before = false;
319 return ret;
320 };
321
322 function skip_whitespace() {
323 while (HOP(WHITESPACE_CHARS, peek()))

Callers 9

read_numFunction · 0.85
read_stringFunction · 0.85
read_line_commentFunction · 0.85
read_multiline_commentFunction · 0.85
read_regexpFunction · 0.85
read_operatorFunction · 0.85
handle_dotFunction · 0.85
read_wordFunction · 0.85
next_tokenFunction · 0.85

Calls 1

HOPFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…