(rbp, isStatement)
| 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; |
nothing calls this directly
no test coverage detected