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

Function advance

Scripts/ace/worker-javascript.js:3133–3190  ·  view source on GitHub ↗
(id, t)

Source from the content-addressed store, hash-verified

3131 }
3132
3133 function advance(id, t) {
3134
3135 switch (state.tokens.curr.id) {
3136 case "(number)":
3137 if (state.tokens.next.id === ".") {
3138 warning("W005", state.tokens.curr);
3139 }
3140 break;
3141 case "-":
3142 if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
3143 warning("W006");
3144 }
3145 break;
3146 case "+":
3147 if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
3148 warning("W007");
3149 }
3150 break;
3151 }
3152
3153 if (id && state.tokens.next.id !== id) {
3154 if (t) {
3155 if (state.tokens.next.id === "(end)") {
3156 error("E019", t, t.id);
3157 } else {
3158 error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
3159 }
3160 } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
3161 warning("W116", state.tokens.next, id, state.tokens.next.value);
3162 }
3163 }
3164
3165 state.tokens.prev = state.tokens.curr;
3166 state.tokens.curr = state.tokens.next;
3167 for (;;) {
3168 state.tokens.next = lookahead.shift() || lex.token();
3169
3170 if (!state.tokens.next) { // No more tokens left, give up
3171 quit("E041", state.tokens.curr.line);
3172 }
3173
3174 if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
3175 return;
3176 }
3177
3178 if (state.tokens.next.check) {
3179 state.tokens.next.check();
3180 }
3181
3182 if (state.tokens.next.isSpecial) {
3183 doOption();
3184 } else {
3185 if (state.tokens.next.id !== "(endline)") {
3186 break;
3187 }
3188 }
3189 }
3190 }

Callers 15

expressionFunction · 0.85
commaFunction · 0.85
optionalidentifierFunction · 0.85
identifierFunction · 0.85
parseFinalSemicolonFunction · 0.85
statementFunction · 0.85
statementsFunction · 0.85
directivesFunction · 0.85
blockFunction · 0.85
propertyNameFunction · 0.85

Calls 4

warningFunction · 0.85
quitFunction · 0.85
doOptionFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected