[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 90a9056 10/22: ...or any following one
From: |
Dmitry Gutov |
Subject: |
[elpa] master 90a9056 10/22: ...or any following one |
Date: |
Fri, 24 Apr 2015 02:57:12 +0000 |
branch: master
commit 90a905698cebcb9ce3adae86ab4d6733c511c831
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
...or any following one
Likewise, js2-match-token scanned the next token with the wrong modifier.
Instead of adding an optional argument, I've opted to use
js2-get-prop-name-token, in order not to duplicate the version check.
#216
---
js2-mode.el | 14 +++++++-------
tests/parser.el | 3 +++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/js2-mode.el b/js2-mode.el
index 1a7a852..5424ff0 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10367,13 +10367,13 @@ If ONLY-OF-P is non-nil, only the 'for (foo of bar)'
form is allowed."
(if elem (js2-node-set-prop elem 'STATIC t)
(js2-report-error "msg.unexpected.static")))
;; Handle commas, depending on class-p.
- (let ((comma (js2-match-token js2-COMMA)))
- (if class-p
- (if comma
- (js2-report-error "msg.class.unexpected.comma"))
- (if comma
- (setq after-comma (js2-current-token-end))
- (setq continue nil))))
+ (let ((tok (js2-get-prop-name-token)))
+ (if (eq tok js2-COMMA)
+ (if class-p
+ (js2-report-error "msg.class.unexpected.comma")
+ (setq after-comma (js2-current-token-end)))
+ (js2-unget-token)
+ (unless class-p (setq continue nil))))
;; Append any parsed element.
(if elem (push elem elems))) ; end loop
(js2-must-match js2-RC "msg.no.brace.prop")
diff --git a/tests/parser.el b/tests/parser.el
index 4c9b467..d791d3f 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -683,6 +683,9 @@ the test."
(js2-deftest-parse parse-super-keyword
"class Foo {\n constructor() { super(42);\n}\n foo() {
super.foo();\n}\n}")
+(js2-deftest-parse parse-class-keywordlike-method
+ "class C {\n delete() {}\n if() {}\n}")
+
;;; Scopes
(js2-deftest ast-symbol-table-includes-fn-node "function foo() {}"
- [elpa] master updated (c10ba4b -> 54df259), Dmitry Gutov, 2015/04/23
- [elpa] master fae5776 01/22: Check that the let declaration comes before the reference, Dmitry Gutov, 2015/04/23
- [elpa] master dd2106b 02/22: Merge branch 'let-temporal-dz', Dmitry Gutov, 2015/04/23
- [elpa] master 28853c9 03/22: do auto semicolon insert on function exports, Dmitry Gutov, 2015/04/23
- [elpa] master dfad0d5 04/22: Merge pull request #211 from cowboyd/no-semicolon-warning-on-function-export, Dmitry Gutov, 2015/04/23
- [elpa] master 02fea21 06/22: Merge pull request #213 from lelit/typos, Dmitry Gutov, 2015/04/23
- [elpa] master bf454ef 05/22: Fix typos in comments and docstrings, Dmitry Gutov, 2015/04/23
- [elpa] master 7bf479a 08/22: Fix js2-paren-node length, Dmitry Gutov, 2015/04/23
- [elpa] master 4d8ec67 07/22: Rely on bogus scopes less, Dmitry Gutov, 2015/04/23
- [elpa] master 4a1b4e8 09/22: Parse without error first method in a class with keyword name, Dmitry Gutov, 2015/04/23
- [elpa] master 90a9056 10/22: ...or any following one,
Dmitry Gutov <=
- [elpa] master bc61ce0 11/22: Fix off-by-one error for comment node length, Dmitry Gutov, 2015/04/23
- [elpa] master 3b76567 12/22: Fix js2-node-get-enclosing-scope, Dmitry Gutov, 2015/04/23
- [elpa] master 458d3fe 14/22: Merge pull request #221 from jacksonrayhamilton/enclosing-scope, Dmitry Gutov, 2015/04/23
- [elpa] master a184642 13/22: Merge pull request #220 from jacksonrayhamilton/comment-length, Dmitry Gutov, 2015/04/23
- [elpa] master 2bb4db0 15/22: Assign quote syntax to backquotes, Dmitry Gutov, 2015/04/23
- [elpa] master 4de6f03 16/22: Don't indent in multiline strings, Dmitry Gutov, 2015/04/23
- [elpa] master ee4a202 18/22: Merge pull request #195 from jacksonrayhamilton/pretty-multiline-declarations, Dmitry Gutov, 2015/04/23
- [elpa] master d4d9c54 17/22: js2-pretty-multiline-declarations: Add 'dynamic option, Dmitry Gutov, 2015/04/23
- [elpa] master 9790b97 19/22: * js2-mode.el (js2-mode): Use cursor-sensor-mode if available., Dmitry Gutov, 2015/04/23
- [elpa] master ac93b9e 21/22: Address two FIXMEs; fix a regression flagged by tests, Dmitry Gutov, 2015/04/23