MCPcopy
hub / github.com/BloombergGraphics/whatiscode / lex

Function lex

scripts/libs/esprima.js:1463–1482  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1461 }
1462
1463 function lex() {
1464 var token;
1465 scanning = true;
1466
1467 lastIndex = index;
1468 lastLineNumber = lineNumber;
1469 lastLineStart = lineStart;
1470
1471 skipComment();
1472
1473 token = lookahead;
1474
1475 startIndex = index;
1476 startLineNumber = lineNumber;
1477 startLineStart = lineStart;
1478
1479 lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance();
1480 scanning = false;
1481 return token;
1482 }
1483
1484 function peek() {
1485 scanning = true;

Callers 15

expectFunction · 0.85
expectCommaSeparatorFunction · 0.85
expectKeywordFunction · 0.85
consumeSemicolonFunction · 0.85
parseArrayPatternFunction · 0.85
parsePropertyPatternFunction · 0.85
parseObjectPatternFunction · 0.85
parsePatternWithDefaultFunction · 0.85
parseArrayInitialiserFunction · 0.85
parseObjectPropertyKeyFunction · 0.85
parseObjectPropertyFunction · 0.85
parseGroupExpressionFunction · 0.85

Calls 3

skipCommentFunction · 0.85
collectTokenFunction · 0.85
advanceFunction · 0.85

Tested by

no test coverage detected