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

Function advance

ServerEditorWeb/ace/worker-javascript.js:2982–3045  ·  view source on GitHub ↗
(id, t)

Source from the content-addressed store, hash-verified

2980 }
2981
2982 function advance(id, t) {
2983
2984 switch (state.tokens.curr.id) {
2985 case "(number)":
2986 if (state.tokens.next.id === ".") {
2987 warning("W005", state.tokens.curr);
2988 }
2989 break;
2990 case "-":
2991 if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
2992 warning("W006");
2993 }
2994 break;
2995 case "+":
2996 if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
2997 warning("W007");
2998 }
2999 break;
3000 }
3001
3002 if (id && state.tokens.next.id !== id) {
3003 if (t) {
3004 if (state.tokens.next.id === "(end)") {
3005 error("E019", t, t.id);
3006 } else {
3007 error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
3008 }
3009 } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
3010 if (state.tokens.next.value === "...") {
3011 if (!state.option.esnext) {
3012 warning("W119", state.tokens.next, "spread/rest operator");
3013 }
3014 } else {
3015 warning("W116", state.tokens.next, id, state.tokens.next.value);
3016 }
3017 }
3018 }
3019
3020 state.tokens.prev = state.tokens.curr;
3021 state.tokens.curr = state.tokens.next;
3022 for (;;) {
3023 state.tokens.next = lookahead.shift() || lex.token();
3024
3025 if (!state.tokens.next) { // No more tokens left, give up
3026 quit("E041", state.tokens.curr.line);
3027 }
3028
3029 if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
3030 return;
3031 }
3032
3033 if (state.tokens.next.check) {
3034 state.tokens.next.check();
3035 }
3036
3037 if (state.tokens.next.isSpecial) {
3038 doOption();
3039 } else {

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