[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 1f06301 198/271: Pass property lookup test.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 1f06301 198/271: Pass property lookup test. |
Date: |
Thu, 05 Feb 2015 18:31:10 +0000 |
branch: master
commit 1f063011a24d01b51e8d19fdeb7f6e1fc2686872
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Pass property lookup test.
---
context-coloring.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index b6531bf..283bddd 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -227,6 +227,7 @@ END (exclusive) with the face corresponding to LEVEL."
;;; js2-mode colorization
+;; TODO: Consider `js2-node-top-level-decl-p' as an optimization.
(defsubst context-coloring-js2-scope-level (scope)
"Gets the level of SCOPE."
(let ((level 0)
@@ -249,7 +250,10 @@ variable."
(and (js2-name-node-p node)
(let ((parent (js2-node-parent node)))
(not (or (js2-object-prop-node-p parent)
- (js2-prop-get-node-p parent))))))
+ (and (js2-prop-get-node-p parent)
+ ;; For nested property lookup, the node on the left is a
+ ;; `js2-prop-get-node', so this always works.
+ (eq node (js2-prop-get-node-right parent))))))))
(defsubst context-coloring-js2-colorize-node (node level)
"Colors NODE with the color for LEVEL."
@@ -267,7 +271,6 @@ generated by js2-mode."
js2-mode-ast
(lambda (node end-p)
(when (null end-p)
- ;; (message "%s" (js2-node-short-name node))
(cond
((js2-comment-node-p node)
(context-coloring-js2-colorize-node
- [elpa] master 8665ff3 233/271: Simplify `context-coloring-set-colors'., (continued)
- [elpa] master 8665ff3 233/271: Simplify `context-coloring-set-colors'., Jackson Ray Hamilton, 2015/02/05
- [elpa] master eaece82 263/271: Version 4.0.0., Jackson Ray Hamilton, 2015/02/05
- [elpa] master d885920 231/271: Merge branch 'feature/comments-and-strings' into develop, Jackson Ray Hamilton, 2015/02/05
- [elpa] master 96da8de 219/271: Merge branch 'master' into develop, Jackson Ray Hamilton, 2015/02/05
- [elpa] master c947690 238/271: Documentation. Cleanup. Copyright notices., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 68824f6 193/271: Add failing test for key names., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 784910c 266/271: externals-list: Add context-coloring, Jackson Ray Hamilton, 2015/02/05
- [elpa] master 079a5a8 237/271: Document tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 5c8855f 212/271: Merge branch 'feature/key-values' into develop, Jackson Ray Hamilton, 2015/02/05
- [elpa] master 3944181 223/271: Renames. Cleanup., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 1f06301 198/271: Pass property lookup test.,
Jackson Ray Hamilton <=
- [elpa] master f836bd2 141/271: Add js2-mode test., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 32aacc9 216/271: Add customization interface., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 0830f53 104/271: Merge branch 'develop', Jackson Ray Hamilton, 2015/02/05
- [elpa] master 1df629d 222/271: Enable rainbow-mode., Jackson Ray Hamilton, 2015/02/05
- [elpa] master dc9644e 271/271: Merge branch 'master' of git://git.sv.gnu.org/emacs/elpa, Jackson Ray Hamilton, 2015/02/05
- [elpa] master 97150a1 256/271: Update .elpaignore., Jackson Ray Hamilton, 2015/02/05
- [elpa] master ae2adc4 259/271: Merge themes into main file., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 5908ce8 232/271: Fix readme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 27db37a 202/271: Use a hash table as a scope level fast track., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f3ab262 246/271: Merge branch 'develop', Jackson Ray Hamilton, 2015/02/05