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

Function directives

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

Source from the content-addressed store, hash-verified

3941 return a;
3942 }
3943 function directives() {
3944 var i, p, pn;
3945
3946 while (state.tokens.next.id === "(string)") {
3947 p = peek(0);
3948 if (p.id === "(endline)") {
3949 i = 1;
3950 do {
3951 pn = peek(i++);
3952 } while (pn.id === "(endline)");
3953 if (pn.id === ";") {
3954 p = pn;
3955 } else if (pn.value === "[" || pn.value === ".") {
3956 return;
3957 } else if (!state.option.asi || pn.value === "(") {
3958 warning("W033", state.tokens.next);
3959 }
3960 } else if (p.id === "." || p.id === "[") {
3961 return;
3962 } else if (p.id !== ";") {
3963 warning("W033", p);
3964 }
3965
3966 advance();
3967 if (state.directive[state.tokens.curr.value]) {
3968 warning("W034", state.tokens.curr, state.tokens.curr.value);
3969 }
3970
3971 if (state.tokens.curr.value === "use strict") {
3972 if (!state.option["(explicitNewcap)"]) {
3973 state.option.newcap = true;
3974 }
3975 state.option.undef = true;
3976 }
3977 state.directive[state.tokens.curr.value] = true;
3978
3979 if (p.id === ";") {
3980 advance(";");
3981 }
3982 }
3983 }
3984 function block(ordinary, stmt, isfunc, isfatarrow, iscase) {
3985 var a,
3986 b = inblock,

Callers 2

blockFunction · 0.85
itselfFunction · 0.85

Calls 3

peekFunction · 0.85
warningFunction · 0.85
advanceFunction · 0.85

Tested by

no test coverage detected