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

Function warning

ServerEditorWeb/ace/worker-javascript.js:2596–2641  ·  view source on GitHub ↗
(code, t, a, b, c, d)

Source from the content-addressed store, hash-verified

2594 }
2595
2596 function warning(code, t, a, b, c, d) {
2597 var ch, l, w, msg;
2598
2599 if (/^W\d{3}$/.test(code)) {
2600 if (state.ignored[code])
2601 return;
2602
2603 msg = messages.warnings[code];
2604 } else if (/E\d{3}/.test(code)) {
2605 msg = messages.errors[code];
2606 } else if (/I\d{3}/.test(code)) {
2607 msg = messages.info[code];
2608 }
2609
2610 t = t || state.tokens.next;
2611 if (t.id === "(end)") { // `~
2612 t = state.tokens.curr;
2613 }
2614
2615 l = t.line || 0;
2616 ch = t.from || 0;
2617
2618 w = {
2619 id: "(error)",
2620 raw: msg.desc,
2621 code: msg.code,
2622 evidence: state.lines[l - 1] || "",
2623 line: l,
2624 character: ch,
2625 scope: JSHINT.scope,
2626 a: a,
2627 b: b,
2628 c: c,
2629 d: d
2630 };
2631
2632 w.reason = supplant(msg.desc, w);
2633 JSHINT.errors.push(w);
2634
2635 removeIgnoredMessages();
2636
2637 if (JSHINT.errors.length >= state.option.maxerr)
2638 quit("E043", l, ch);
2639
2640 return w;
2641 }
2642
2643 function warningAt(m, l, ch, a, b, c, d) {
2644 return warning(m, {

Callers 15

warningAtFunction · 0.85
errorFunction · 0.85
addlabelFunction · 0.85
advanceFunction · 0.85
expressionFunction · 0.85
nobreaknonadjacentFunction · 0.85
nolinebreakFunction · 0.85
nobreakcommaFunction · 0.85
commaFunction · 0.85
prefixFunction · 0.85
infixFunction · 0.85
relationFunction · 0.85

Calls 3

supplantFunction · 0.85
removeIgnoredMessagesFunction · 0.85
quitFunction · 0.85

Tested by

no test coverage detected