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

Function parseClassDeclaration

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

Source from the content-addressed store, hash-verified

4211 }
4212
4213 function parseClassDeclaration() {
4214 var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict;
4215 strict = true;
4216
4217 expectKeyword('class');
4218
4219 id = parseVariableIdentifier();
4220
4221 if (matchKeyword('extends')) {
4222 lex();
4223 superClass = parseLeftHandSideExpressionAllowCall();
4224 }
4225 classBody = parseClassBody();
4226 strict = previousStrict;
4227
4228 return classNode.finishClassDeclaration(id, superClass, classBody);
4229 }
4230
4231 function parseClassExpression() {
4232 var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict;

Callers 1

parseStatementListItemFunction · 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