Permalink
Browse files

Adds comment for Octal literal warning

  • Loading branch information...
1 parent 66fb8b9 commit 40b72132fbe66148e88caf1e454f4ac70b457a45 @goatslacker goatslacker committed Mar 2, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 jshint.js
View
@@ -1243,6 +1243,9 @@ unclosedString: for (;;) {
break;
case '0':
c = '\0';
+ // Octal literals fail in strict mode
+ // check if the number is between 00 and 07
+ // where 'n' is the token next to 'c'
if (n >= 0 && n <= 7 && directive["use strict"]) {
warningAt(
"Octal literals are not allowed in strict mode.",

0 comments on commit 40b7213

Please sign in to comment.