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

Function expectKeyword

lib/assets/javascripts/JSXTransformer.js:5192–5198  ·  view source on GitHub ↗
(keyword, contextual)

Source from the content-addressed store, hash-verified

5190 // If not, an exception will be thrown.
5191
5192 function expectKeyword(keyword, contextual) {
5193 var token = lex();
5194 if (token.type !== (contextual ? Token.Identifier : Token.Keyword) ||
5195 token.value !== keyword) {
5196 throwUnexpected(token);
5197 }
5198 }
5199
5200 // Expect the next token to match the specified contextual keyword.
5201 // If not, an exception will be thrown.

Callers 15

expectContextualKeywordFunction · 0.85
parseArrayInitialiserFunction · 0.85
parseNewExpressionFunction · 0.85
parseVoidTypeFunction · 0.85
parseTypeofTypeFunction · 0.85
parseVariableStatementFunction · 0.85
parseConstLetDeclarationFunction · 0.85
parseExportDeclarationFunction · 0.85
parseImportDeclarationFunction · 0.85
parseIfStatementFunction · 0.85
parseDoWhileStatementFunction · 0.85
parseWhileStatementFunction · 0.85

Calls 2

lexFunction · 0.85
throwUnexpectedFunction · 0.85

Tested by

no test coverage detected