[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b1e7a1d 076/271: Switch to 1-dimensional array.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master b1e7a1d 076/271: Switch to 1-dimensional array. |
Date: |
Thu, 05 Feb 2015 18:29:54 +0000 |
branch: master
commit b1e7a1d7228de097880028b0af53652be2555d78
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Switch to 1-dimensional array.
---
context-coloring.el | 16 ++++++++--------
scopifier.js | 16 ++++++++--------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index c50205d..ecebce6 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -210,12 +210,12 @@ start, end, level, and style."
(let ((i 0)
(len (length tokens)))
(while (< i len)
- (let ((token (elt tokens i)))
- (let ((start (elt token 0))
- (end (elt token 1))
- (face (context-coloring-level-face (elt token 2) (elt token
3))))
- (add-text-properties start end `(face ,face rear-nonsticky t))))
- (setq i (+ i 1))))))
+ (let ((start (elt tokens i))
+ (end (elt tokens (+ i 1)))
+ (face (context-coloring-level-face (elt tokens (+ i 2))
+ (elt tokens (+ i 3)))))
+ (add-text-properties start end `(face ,face rear-nonsticky t)))
+ (setq i (+ i 4))))))
(defun context-coloring-kill-scopifier ()
"Kills the currently-running scopifier process for this
@@ -257,7 +257,7 @@ applying a parsed list of tokens to
(with-current-buffer buffer
(context-coloring-apply-tokens tokens))
(setq context-coloring-scopifier-process nil)
- ;; (message "Colorized (after %f seconds)." (-
(float-time) start-time))
+ (message "Colorized (after %f seconds)." (-
(float-time) start-time))
)))))
;; Give the process its input.
@@ -271,7 +271,7 @@ applying a parsed list of tokens to
"Colors the current buffer by function context."
(interactive)
(setq context-coloring-colorize-start-time (float-time))
- ;; (message "%s" "Colorizing.")
+ (message "%s" "Colorizing.")
(context-coloring-scopify))
(defun context-coloring-change-function (start end length)
diff --git a/scopifier.js b/scopifier.js
index 4b54091..4f3302a 100644
--- a/scopifier.js
+++ b/scopifier.js
@@ -61,12 +61,12 @@ module.exports = function (code) {
// done now.
if (!scope.functionExpressionScope) {
range = scope.block.range;
- scopes.push([
+ scopes.push(
range[0] + 1,
range[1] + 1,
scope.level,
normal
- ]);
+ );
definitionsIndex = tokens.length;
definitionsCount = 0;
for (j = 0; j < scope.variables.length; j += 1) {
@@ -75,12 +75,12 @@ module.exports = function (code) {
for (k = 0; k < variable.defs.length; k += 1) {
definition = variable.defs[k];
range = definition.name.range;
- tokens.push([
+ tokens.push(
range[0] + 1,
range[1] + 1,
scope.level,
bold
- ]);
+ );
}
}
for (j = 0; j < scope.references.length; j += 1) {
@@ -100,13 +100,13 @@ module.exports = function (code) {
}
}
if (!isDefined) {
- tokens.push([
+ tokens.push(
// Handle global references too.
range[0] + 1,
range[1] + 1,
reference.resolved ?
reference.resolved.scope.level : 0,
reference.__maybeImplicitGlobal ? bold : normal
- ]);
+ );
}
}
}
@@ -116,12 +116,12 @@ module.exports = function (code) {
for (i = 0; i < ast.comments.length; i += 1) {
comment = ast.comments[i];
range = comment.range;
- tokens.push([
+ tokens.push(
range[0] + 1,
range[1] + 1,
-1,
italic
- ]);
+ );
}
return scopes.concat(tokens);
- [elpa] master 028370d 054/271: Refactor to be more functional., (continued)
- [elpa] master 028370d 054/271: Refactor to be more functional., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 0e64e85 055/271: Simplify to 2 arrays., Jackson Ray Hamilton, 2015/02/05
- [elpa] master ff988f3 051/271: Fix duplicate tokens and tail-end bug., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 0143a29 058/271: Leverage .jslintrc files., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 38f0821 059/271: Perf with ugly for loops., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 148e55b 046/271: Readme updates., Jackson Ray Hamilton, 2015/02/05
- [elpa] master a02fe9f 064/271: Switch to microoptimized., Jackson Ray Hamilton, 2015/02/05
- [elpa] master f07ce20 061/271: Revert back to functions., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 0ab3ed5 060/271: And it still made no difference., Jackson Ray Hamilton, 2015/02/05
- [elpa] master c2114e9 040/271: Uglify tokenizer now working., Jackson Ray Hamilton, 2015/02/05
- [elpa] master b1e7a1d 076/271: Switch to 1-dimensional array.,
Jackson Ray Hamilton <=
- [elpa] master 7c8e32c 062/271: Restore microooptimized, add more benchmarks, add tests., Jackson Ray Hamilton, 2015/02/05
- [elpa] master eb2e6b3 070/271: Formalize italic support., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 67637bf 072/271: Update test fixture., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 65e4763 065/271: Just push to a single tokens array., Jackson Ray Hamilton, 2015/02/05
- [elpa] master cb8b1f2 066/271: Add light color scheme., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 7a49f9f 067/271: Make comments italic., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 07fe42c 078/271: Vconcat., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 28667b8 075/271: Move microoptimized scopifier into the limelight., Jackson Ray Hamilton, 2015/02/05
- [elpa] master c1f9f11 063/271: Switch to concat., Jackson Ray Hamilton, 2015/02/05
- [elpa] master 183ac4e 081/271: Add emacs benchmark., Jackson Ray Hamilton, 2015/02/05