MCPcopy Index your code
hub / github.com/BloombergGraphics/whatiscode / lookaheadPropertyName

Function lookaheadPropertyName

scripts/libs/esprima.js:2406–2419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2404 }
2405
2406 function lookaheadPropertyName() {
2407 switch (lookahead.type) {
2408 case Token.Identifier:
2409 case Token.StringLiteral:
2410 case Token.BooleanLiteral:
2411 case Token.NullLiteral:
2412 case Token.NumericLiteral:
2413 case Token.Keyword:
2414 return true;
2415 case Token.Punctuator:
2416 return lookahead.value === '[';
2417 }
2418 return false;
2419 }
2420
2421 // This function is to try to parse a MethodDefinition as defined in 14.3. But in the case of object literals,
2422 // it might be called at a position where there is in fact a short hand identifier pattern or a data property.

Callers 2

tryParseMethodDefinitionFunction · 0.85
parseClassBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected