MCPcopy Index your code
hub / github.com/reactjs/react-rails / consumeSemicolon

Function consumeSemicolon

lib/assets/javascripts/JSXTransformer.js:5273–5301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5271 }
5272
5273 function consumeSemicolon() {
5274 var line, oldIndex = index, oldLineNumber = lineNumber,
5275 oldLineStart = lineStart, oldLookahead = lookahead;
5276
5277 // Catch the very common case first: immediately a semicolon (char #59).
5278 if (source.charCodeAt(index) === 59) {
5279 lex();
5280 return;
5281 }
5282
5283 line = lineNumber;
5284 skipComment();
5285 if (lineNumber !== line) {
5286 index = oldIndex;
5287 lineNumber = oldLineNumber;
5288 lineStart = oldLineStart;
5289 lookahead = oldLookahead;
5290 return;
5291 }
5292
5293 if (match(';')) {
5294 lex();
5295 return;
5296 }
5297
5298 if (lookahead.type !== Token.EOF && !match('}')) {
5299 throwUnexpected(lookahead);
5300 }
5301 }
5302
5303 // Return true if provided expression is LeftHandSideExpression
5304

Callers 14

parseVariableStatementFunction · 0.85
parseConstLetDeclarationFunction · 0.85
parseExportDeclarationFunction · 0.85
parseImportDeclarationFunction · 0.85
parseExpressionStatementFunction · 0.85
parseContinueStatementFunction · 0.85
parseBreakStatementFunction · 0.85
parseReturnStatementFunction · 0.85
parseThrowStatementFunction · 0.85
parseDebuggerStatementFunction · 0.85
parseStatementFunction · 0.85
parseTypeAliasFunction · 0.85

Calls 4

lexFunction · 0.85
skipCommentFunction · 0.85
matchFunction · 0.85
throwUnexpectedFunction · 0.85

Tested by

no test coverage detected