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

Function propertyName

ServerEditorWeb/ace/worker-javascript.js:4750–4782  ·  view source on GitHub ↗
(preserveOrToken)

Source from the content-addressed store, hash-verified

4748
4749
4750 function propertyName(preserveOrToken) {
4751 var id;
4752 var preserve = true;
4753 if (typeof preserveOrToken === "object") {
4754 id = preserveOrToken;
4755 } else {
4756 preserve = preserveOrToken;
4757 id = optionalidentifier(false, true, preserve);
4758 }
4759
4760 if (!id) {
4761 if (state.tokens.next.id === "(string)") {
4762 id = state.tokens.next.value;
4763 if (!preserve) {
4764 advance();
4765 }
4766 } else if (state.tokens.next.id === "(number)") {
4767 id = state.tokens.next.value.toString();
4768 if (!preserve) {
4769 advance();
4770 }
4771 }
4772 } else if (typeof id === "object") {
4773 if (id.id === "(string)" || id.id === "(identifier)") id = id.value;
4774 else if (id.id === "(number)") id = id.value.toString();
4775 }
4776
4777 if (id === "hasOwnProperty") {
4778 warning("W001");
4779 }
4780
4781 return id;
4782 }
4783
4784 function functionparams(fatarrow) {
4785 var next;

Callers 2

classbodyFunction · 0.85

Calls 3

optionalidentifierFunction · 0.85
advanceFunction · 0.85
warningFunction · 0.85

Tested by

no test coverage detected