MCPcopy Create free account
hub / github.com/dchester/jsonpath / expectKeyword

Function expectKeyword

jsonpath.js:1923–1928  ·  view source on GitHub ↗
(keyword)

Source from the content-addressed store, hash-verified

1921 // If not, an exception will be thrown.
1922
1923 function expectKeyword(keyword) {
1924 var token = lex();
1925 if (token.type !== Token.Keyword || token.value !== keyword) {
1926 throwUnexpected(token);
1927 }
1928 }
1929
1930 // Return true if the next token matches the specified punctuator.
1931

Callers 15

parseNewExpressionFunction · 0.85
parseVariableStatementFunction · 0.85
parseConstLetDeclarationFunction · 0.85
parseIfStatementFunction · 0.85
parseDoWhileStatementFunction · 0.85
parseWhileStatementFunction · 0.85
parseForStatementFunction · 0.85
parseContinueStatementFunction · 0.85
parseBreakStatementFunction · 0.85
parseReturnStatementFunction · 0.85
parseWithStatementFunction · 0.85
parseSwitchCaseFunction · 0.85

Calls 2

throwUnexpectedFunction · 0.85
lexFunction · 0.70

Tested by

no test coverage detected