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

Function parseClassExpression

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

Source from the content-addressed store, hash-verified

4229 }
4230
4231 function parseClassExpression() {
4232 var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict;
4233 strict = true;
4234
4235 expectKeyword('class');
4236
4237 if (lookahead.type === Token.Identifier) {
4238 id = parseVariableIdentifier();
4239 }
4240
4241 if (matchKeyword('extends')) {
4242 lex();
4243 superClass = parseLeftHandSideExpressionAllowCall();
4244 }
4245 classBody = parseClassBody();
4246 strict = previousStrict;
4247
4248 return classNode.finishClassExpression(id, superClass, classBody);
4249 }
4250
4251 // 14 Program
4252

Callers 1

parsePrimaryExpressionFunction · 0.85

Calls 6

expectKeywordFunction · 0.85
parseVariableIdentifierFunction · 0.85
matchKeywordFunction · 0.85
lexFunction · 0.85
parseClassBodyFunction · 0.85

Tested by

no test coverage detected