|
|
|
@ -5229,6 +5229,10 @@ var JSHINT = (function() { |
|
|
|
var a = [], p; |
|
|
|
|
|
|
|
while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") { |
|
|
|
if (state.tokens.next.value === "switch") { |
|
|
|
warning("E067", state.tokens.next, "switch"); |
|
|
|
break; |
|
|
|
} |
|
|
|
if (state.tokens.next.id === ";") { |
|
|
|
p = peek(); |
|
|
|
|
|
|
|
@ -9215,7 +9219,7 @@ var JSHINT = (function() { |
|
|
|
statements(0); |
|
|
|
} |
|
|
|
|
|
|
|
if (state.tokens.next.id !== "(end)") { |
|
|
|
if (state.tokens.next.id !== "(end)"&& state.tokens.next.value !== "switch") { |
|
|
|
quit("E041", state.tokens.curr); |
|
|
|
} |
|
|
|
|
|
|
|
@ -11266,7 +11270,8 @@ var errors = { |
|
|
|
E064: "Super call may only be used within class method bodies.", |
|
|
|
E065: "Functions defined outside of strict mode with non-simple parameter lists may not " + |
|
|
|
"enable strict mode.", |
|
|
|
E066: "Asynchronous iteration is only available with for-of loops." |
|
|
|
E066: "Asynchronous iteration is only available with for-of loops.", |
|
|
|
E067: "Expected an 'if/else' and instead saw 'switch'. TBEL does not support the 'switch' statement." |
|
|
|
}; |
|
|
|
|
|
|
|
var warnings = { |
|
|
|
@ -11364,7 +11369,6 @@ var warnings = { |
|
|
|
W086: "Expected a 'break' statement before '{a}'.", |
|
|
|
W087: "Forgotten 'debugger' statement?", |
|
|
|
W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.", |
|
|
|
// W288: "The syntax of function '{a}' is specific to TBEL, and is not supported by JS executor.",
|
|
|
|
W089: "The body of a for in should be wrapped in an if statement to filter " + |
|
|
|
"unwanted properties from the prototype.", |
|
|
|
W090: "'{a}' is not a statement label.", |
|
|
|
|