MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / classdef

Function classdef

lib/web/jshint.js:22677–22706  ·  view source on GitHub ↗
(rbp, isStatement)

Source from the content-addressed store, hash-verified

22675 });
22676
22677 function classdef(rbp, isStatement) {
22678
22679 /*jshint validthis:true */
22680 if (!state.inES6()) {
22681 warning("W104", state.tokens.curr, "class", "6");
22682 }
22683 if (isStatement) {
22684 // BindingIdentifier
22685 this.name = identifier();
22686
22687 state.funct["(scope)"].addlabel(this.name, {
22688 type: "class",
22689 token: state.tokens.curr });
22690
22691 } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") {
22692 // BindingIdentifier(opt)
22693 this.name = identifier();
22694 this.namedExpr = true;
22695 } else {
22696 this.name = state.nameStack.infer();
22697 }
22698
22699 classtail(this);
22700
22701 if (isStatement) {
22702 state.funct["(scope)"].initialize(this.name);
22703 }
22704
22705 return this;
22706 }
22707
22708 function classtail(c) {
22709 var wasInClassBody = state.inClassBody;

Callers

nothing calls this directly

Calls 4

warningFunction · 0.85
classtailFunction · 0.85
identifierFunction · 0.70
initializeMethod · 0.45

Tested by

no test coverage detected