]> code.delx.au - gnu-emacs-elpa/commitdiff
Update README
authorDmitry Gutov <dgutov@yandex.ru>
Wed, 16 Feb 2011 18:56:09 +0000 (21:56 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Wed, 16 Feb 2011 20:29:30 +0000 (23:29 +0300)
README.md

index 4d7b235f81079885d5bd941d46c3c523fbe66da3..04d5dd17d1861a6afc7a2e561dfdc75259bceb91 100644 (file)
--- a/README.md
+++ b/README.md
@@ -143,6 +143,33 @@ Examples of output:
 
 No support for library-specific extension methods like _.extend.
 
+Highlights undeclared/external variables
+----------------------------------------
+
+Original mode highlights them only on the left side of assignments:
+
+    var house;
+    hose = new House(); // highlights "hose"
+
+Here they are highlighted in all expressions:
+    
+    function feed(fishes, food) {
+        for each (var fish in fshes) { // highlights "fshes"
+            food.feed(fsh); // highlights "fsh"
+        }
+        hood.discard(); // highlights "hood"
+    }
+
+Destructuring assignments and array comprehensions (JS 1.7) are supported:
+
+    let three, [one, two] = [1, 2];
+    thee = one + two; // highlights "thee" 
+
+    function revenue(goods) {
+        // highlights "coast"
+        return [price - coast for each ({price, cost} in goods)].reduce(add);
+    }
+    
 Bugs
 ====