Permalink
Browse files

=== typeof

  • Loading branch information...
1 parent 686e343 commit dab079a8a2bf35494fd5a163636498e3daf10066 Douglas Crockford committed Jan 29, 2013
Showing with 11 additions and 2 deletions.
  1. +11 −2 jslint.js
View
@@ -1,5 +1,5 @@
// jslint.js
-// 2012-12-31
+// 2013-01-29
// Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
@@ -2770,6 +2770,15 @@ klass: do {
right.string === 'null') {
warn("unexpected_typeof_a", left, right.string);
}
+ } else if (right.id === 'typeof') {
+ if (left.id !== '(string)') {
+ warn("expected_string_a", left, left.id === '(number)'
+ ? left.number
+ : left.string);
+ } else if (left.string === 'undefined' ||
+ left.string === 'null') {
+ warn("unexpected_typeof_a", right, left.string);
+ }
}
that.first = left;
that.second = check_relation(right);
@@ -6453,7 +6462,7 @@ klass: do {
itself.jslint = itself;
- itself.edition = '2012-12-31';
+ itself.edition = '2013-01-29';
return itself;
}());

0 comments on commit dab079a

Please sign in to comment.