MCPcopy
hub / github.com/PaulTaykalo/objc-dependency-visualizer / doOption

Function doOption

Scripts/ace/worker-javascript.js:2889–3109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2887 }
2888
2889 function doOption() {
2890 var nt = state.tokens.next;
2891 var body = nt.body.match(/(-\s+)?[^\s,:]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g) || [];
2892 var predef = {};
2893
2894 if (nt.type === "globals") {
2895 body.forEach(function(g) {
2896 g = g.split(":");
2897 var key = (g[0] || "").trim();
2898 var val = (g[1] || "").trim();
2899
2900 if (key.charAt(0) === "-") {
2901 key = key.slice(1);
2902 val = false;
2903
2904 JSHINT.blacklist[key] = key;
2905 delete predefined[key];
2906 } else {
2907 predef[key] = (val === "true");
2908 }
2909 });
2910
2911 combine(predefined, predef);
2912
2913 for (var key in predef) {
2914 if (_.has(predef, key)) {
2915 declared[key] = nt;
2916 }
2917 }
2918 }
2919
2920 if (nt.type === "exported") {
2921 body.forEach(function(e) {
2922 exported[e] = true;
2923 });
2924 }
2925
2926 if (nt.type === "members") {
2927 membersOnly = membersOnly || {};
2928
2929 body.forEach(function(m) {
2930 var ch1 = m.charAt(0);
2931 var ch2 = m.charAt(m.length - 1);
2932
2933 if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) {
2934 m = m
2935 .substr(1, m.length - 2)
2936 .replace("\\\"", "\"");
2937 }
2938
2939 membersOnly[m] = false;
2940 });
2941 }
2942
2943 var numvals = [
2944 "maxstatements",
2945 "maxparams",
2946 "maxdepth",

Callers 1

advanceFunction · 0.85

Calls 5

combineFunction · 0.85
checkOptionFunction · 0.85
removeIgnoredMessagesFunction · 0.85
assumeFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected