MCPcopy
hub / github.com/RubyLouvre/anu / next

Function next

test/babel.js:49968–49987  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

49966 throw error;
49967 },
49968 next = function next(c) {
49969
49970 // If a c parameter is provided, verify that it matches the current character.
49971
49972 if (c && c !== ch) {
49973 error("Expected " + renderChar(c) + " instead of " + renderChar(ch));
49974 }
49975
49976 // Get the next character. When there are no more characters,
49977 // return the empty string.
49978
49979 ch = text.charAt(at);
49980 at++;
49981 columnNumber++;
49982 if (ch === '\n' || ch === '\r' && peek() !== '\n') {
49983 lineNumber++;
49984 columnNumber = 0;
49985 }
49986 return ch;
49987 },
49988 peek = function peek() {
49989
49990 // Get the next character without consuming it or

Callers 13

identifierFunction · 0.70
numberFunction · 0.70
stringFunction · 0.70
inlineCommentFunction · 0.70
blockCommentFunction · 0.70
commentFunction · 0.70
whiteFunction · 0.70
wordFunction · 0.70
arrayFunction · 0.70
objectFunction · 0.70
parseHelperClassRangesFunction · 0.70

Calls 3

errorFunction · 0.85
renderCharFunction · 0.85
peekFunction · 0.85

Tested by

no test coverage detected