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

Function expect

scripts/libs/esprima.js:2129–2134  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

2127 // If not, an exception will be thrown.
2128
2129 function expect(value) {
2130 var token = lex();
2131 if (token.type !== Token.Punctuator || token.value !== value) {
2132 throwUnexpectedToken(token);
2133 }
2134 }
2135
2136 /**
2137 * @name expectCommaSeparator

Callers 15

expectCommaSeparatorFunction · 0.85
parseArrayPatternFunction · 0.85
parsePropertyPatternFunction · 0.85
parseObjectPatternFunction · 0.85
parseArrayInitialiserFunction · 0.85
parseObjectPropertyKeyFunction · 0.85
tryParseMethodDefinitionFunction · 0.85
parseObjectInitialiserFunction · 0.85
parseGroupExpressionFunction · 0.85
parseArgumentsFunction · 0.85
parseNonComputedMemberFunction · 0.85
parseComputedMemberFunction · 0.85

Calls 2

lexFunction · 0.85
throwUnexpectedTokenFunction · 0.85

Tested by

no test coverage detected