MCPcopy Index your code
hub / github.com/PaulTaykalo/objc-dependency-visualizer / classbody

Function classbody

Scripts/ace/worker-javascript.js:5787–5883  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

5785 }
5786
5787 function classbody(c) {
5788 var name;
5789 var isStatic;
5790 var isGenerator;
5791 var getset;
5792 var props = {};
5793 var staticProps = {};
5794 var computed;
5795 for (var i = 0; state.tokens.next.id !== "}"; ++i) {
5796 name = state.tokens.next;
5797 isStatic = false;
5798 isGenerator = false;
5799 getset = null;
5800 if (name.id === "*") {
5801 isGenerator = true;
5802 advance("*");
5803 name = state.tokens.next;
5804 }
5805 if (name.id === "[") {
5806 name = computedPropertyName();
5807 } else if (isPropertyName(name)) {
5808 advance();
5809 computed = false;
5810 if (name.identifier && name.value === "static") {
5811 if (checkPunctuators(state.tokens.next, ["*"])) {
5812 isGenerator = true;
5813 advance("*");
5814 }
5815 if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") {
5816 computed = state.tokens.next.id === "[";
5817 isStatic = true;
5818 name = state.tokens.next;
5819 if (state.tokens.next.id === "[") {
5820 name = computedPropertyName();
5821 } else advance();
5822 }
5823 }
5824
5825 if (name.identifier && (name.value === "get" || name.value === "set")) {
5826 if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") {
5827 computed = state.tokens.next.id === "[";
5828 getset = name;
5829 name = state.tokens.next;
5830 if (state.tokens.next.id === "[") {
5831 name = computedPropertyName();
5832 } else advance();
5833 }
5834 }
5835 } else {
5836 warning("W052", state.tokens.next, state.tokens.next.value || state.tokens.next.type);
5837 advance();
5838 continue;
5839 }
5840
5841 if (!checkPunctuators(state.tokens.next, ["("])) {
5842 error("E054", state.tokens.next, state.tokens.next.value);
5843 while (state.tokens.next.id !== "}" &&
5844 !checkPunctuators(state.tokens.next, ["("])) {

Callers 1

classtailFunction · 0.85

Calls 11

advanceFunction · 0.85
computedPropertyNameFunction · 0.85
isPropertyNameFunction · 0.85
checkPunctuatorsFunction · 0.85
warningFunction · 0.85
doFunctionFunction · 0.85
saveAccessorFunction · 0.85
savePropertyFunction · 0.85
propertyNameFunction · 0.85
checkPropertiesFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected