MCPcopy Index your code
hub / github.com/Macuyiko/minecraft-python / saveAccessor

Function saveAccessor

ServerEditorWeb/ace/worker-javascript.js:6421–6446  ·  view source on GitHub ↗
(accessorType, props, name, tkn, isClass, isStatic)

Source from the content-addressed store, hash-verified

6419 props[name].basictkn = tkn;
6420 }
6421 function saveAccessor(accessorType, props, name, tkn, isClass, isStatic) {
6422 var flagName = accessorType === "get" ? "getterToken" : "setterToken";
6423 var msg = "";
6424
6425 if (isClass) {
6426 if (isStatic) {
6427 msg += "static ";
6428 }
6429 msg += accessorType + "ter method";
6430 } else {
6431 msg = "key";
6432 }
6433
6434 state.tokens.curr.accessorType = accessorType;
6435 state.nameStack.set(tkn);
6436
6437 if (props[name] && _.has(props, name)) {
6438 if (props[name].basic || props[name][flagName]) {
6439 warning("W075", state.tokens.next, msg, name);
6440 }
6441 } else {
6442 props[name] = {};
6443 }
6444
6445 props[name][flagName] = tkn;
6446 }
6447
6448 function computedPropertyName() {
6449 advance("[");

Callers 2

classbodyFunction · 0.85

Calls 1

warningFunction · 0.85

Tested by

no test coverage detected