[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2801681 26/49: Fix "pos" argument in template node constru
From: |
Dmitry Gutov |
Subject: |
[elpa] master 2801681 26/49: Fix "pos" argument in template node constructors |
Date: |
Mon, 16 Jan 2017 15:35:48 +0000 (UTC) |
branch: master
commit 28016813174b661585a3ccb0c4e2889f09479d78
Author: Matt Giles <address@hidden>
Commit: Matt Giles <address@hidden>
Fix "pos" argument in template node constructors
Previously the template-literal and tagged-template constructors
took a "beg" argument, which did not set the js2-node-pos field.
This renames the "beg" argument to "pos".
---
js2-mode.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/js2-mode.el b/js2-mode.el
index 7d52e07..dc86321 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -3773,7 +3773,7 @@ You can tell the quote type by looking at the first
character."
(:include js2-node)
(:constructor nil)
(:constructor make-js2-template-node (&key (type
js2-TEMPLATE_HEAD)
- beg len kids)))
+ pos len kids)))
"Template literal."
kids) ; `js2-string-node' is used for string segments, other nodes
; for substitutions inside.
@@ -3796,7 +3796,7 @@ You can tell the quote type by looking at the first
character."
(:include js2-node)
(:constructor nil)
(:constructor make-js2-tagged-template-node (&key (type
js2-TAGGED_TEMPLATE)
- beg len tag
template)))
+ pos len tag
template)))
"Tagged template literal."
tag ; `js2-node' with the tag expression.
template) ; `js2-template-node' with the template.
@@ -10157,9 +10157,9 @@ Returns an expression tree that includes PN, the parent
node."
(defun js2-parse-tagged-template (tag-node tpl-node)
"Parse tagged template expression."
- (let* ((beg (js2-node-pos tag-node))
- (pn (make-js2-tagged-template-node :beg beg
- :len (- (js2-current-token-end)
beg)
+ (let* ((pos (js2-node-pos tag-node))
+ (pn (make-js2-tagged-template-node :pos pos
+ :len (- (js2-current-token-end)
pos)
:tag tag-node
:template tpl-node)))
(js2-node-add-children pn tag-node tpl-node)
@@ -10466,7 +10466,7 @@ array-literals, array comprehensions and regular
expressions."
(setq tt (js2-get-token 'TEMPLATE_TAIL))
(push (make-js2-string-node :type tt) kids))
(setq kids (nreverse kids))
- (let ((tpl (make-js2-template-node :beg beg
+ (let ((tpl (make-js2-template-node :pos beg
:len (- (js2-current-token-end) beg)
:kids kids)))
(apply #'js2-node-add-children tpl kids)
- [elpa] master 4e5babf 03/49: Merge pull request #345 from jacott/master, (continued)
- [elpa] master 4e5babf 03/49: Merge pull request #345 from jacott/master, Dmitry Gutov, 2017/01/16
- [elpa] master 980eb3d 04/49: Support ES7 exponentiation, Dmitry Gutov, 2017/01/16
- [elpa] master 49f9761 08/49: js2-jsdoc-arg-tag-regexp: Recognize @module, Dmitry Gutov, 2017/01/16
- [elpa] master e45206b 11/49: js2-parse-class: Convert positions to relative for NAME and EXTENDS, too, Dmitry Gutov, 2017/01/16
- [elpa] master bea6942 13/49: Unbind js2-mode-show-node, Dmitry Gutov, 2017/01/16
- [elpa] master c0801b2 12/49: Propertize regexp literals like js-mode does, Dmitry Gutov, 2017/01/16
- [elpa] master 9a8aaa9 28/49: Fix length of name in namespace-import nodes, Dmitry Gutov, 2017/01/16
- [elpa] master 44c289f 24/49: Copy edits, Dmitry Gutov, 2017/01/16
- [elpa] master b6d9301 17/49: Merge pull request #377 from XeCycle/memfn-delete, Dmitry Gutov, 2017/01/16
- [elpa] master 64ec0a2 14/49: Allow newline in globals declaration, Dmitry Gutov, 2017/01/16
- [elpa] master 2801681 26/49: Fix "pos" argument in template node constructors,
Dmitry Gutov <=
- [elpa] master 712dfb0 29/49: Merge pull request #384 from mishoo/master, Dmitry Gutov, 2017/01/16
- [elpa] master df06798 23/49: Merge pull request #378 from JulianKniephoff/include-externs-locally, Dmitry Gutov, 2017/01/16
- [elpa] master 2a79649 33/49: Fix indentation after regexp in js2-old-indent.el, Dmitry Gutov, 2017/01/16
- [elpa] master f450de0 34/49: Handle destructuring assignments when classifying variables, Dmitry Gutov, 2017/01/16
- [elpa] master 90e37cd 45/49: Merge pull request #397 from lelit/issue393, Dmitry Gutov, 2017/01/16
- [elpa] master 9b63a13 16/49: Special methods should allow keywords as names, Dmitry Gutov, 2017/01/16
- [elpa] master 672e2da 07/49: js2-parse-mul-expr: Parse the right operand as exponentiation too, Dmitry Gutov, 2017/01/16
- [elpa] master a91e357 40/49: Create a separate scope for switch statements, Dmitry Gutov, 2017/01/16
- [elpa] master 4d35da5 30/49: Fix the fix (error detection), Dmitry Gutov, 2017/01/16
- [elpa] master 31a2399 44/49: Mostly cosmetic, split js2--classify-variables in three simpler functions, Dmitry Gutov, 2017/01/16