[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b904d10 023/110: Merge pull request #279 from XeCycle/clas
From: |
Dmitry Gutov |
Subject: |
[elpa] master b904d10 023/110: Merge pull request #279 from XeCycle/class-semicolon-elem |
Date: |
Thu, 23 Jun 2016 01:12:54 +0000 (UTC) |
branch: master
commit b904d10efedf93040b6da38e6bea1204caee11e7
Merge: 6aba571 c0e0309
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>
Merge pull request #279 from XeCycle/class-semicolon-elem
Allow semicolons in a class body
---
js2-mode.el | 4 ++++
tests/parser.el | 3 +++
2 files changed, 7 insertions(+)
diff --git a/js2-mode.el b/js2-mode.el
index c98917c..865f287 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -10649,6 +10649,10 @@ expression)."
(if after-comma
(js2-parse-warn-trailing-comma "msg.extra.trailing.comma"
pos elems after-comma)))
+ ;; Skip semicolons in a class body
+ ((and class-p
+ (= tt js2-SEMI))
+ nil)
(t
(js2-report-error "msg.bad.prop")
(unless js2-recover-from-parse-errors
diff --git a/tests/parser.el b/tests/parser.el
index 650bac8..c65be2c 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -766,6 +766,9 @@ the test."
(js2-deftest-parse parse-class-keywordlike-method
"class C {\n delete() {}\n if() {}\n}")
+(js2-deftest-parse parse-harmony-class-allow-semicolon-element
+ "class Foo {;}" :reference "class Foo {\n}")
+
;;; Scopes
(js2-deftest ast-symbol-table-includes-fn-node "function foo() {}"
- [elpa] master updated (7a2deff -> 04f3d4b), Dmitry Gutov, 2016/06/22
- [elpa] master f85abdd 005/110: Fix docstring to conform to the Elisp guideline, Dmitry Gutov, 2016/06/22
- [elpa] master b035bd0 006/110: Extract contextual keyword highlighting process from a predicate function, Dmitry Gutov, 2016/06/22
- [elpa] master cef7731 016/110: Handle open-curlies after newline, Dmitry Gutov, 2016/06/22
- [elpa] master 84379dd 004/110: Treat async/await as contextual keywords; Refs #185, Dmitry Gutov, 2016/06/22
- [elpa] master a2be944 014/110: Add a test for the latest change, Dmitry Gutov, 2016/06/22
- [elpa] master 34245fe 008/110: Don't treat getter / setter pairs as duplicates, Dmitry Gutov, 2016/06/22
- [elpa] master fb3f5b6 010/110: Fix 'make all' on older emacsen, Dmitry Gutov, 2016/06/22
- [elpa] master 37867af 020/110: Add NEWS entry about rename to method-node, Dmitry Gutov, 2016/06/22
- [elpa] master b904d10 023/110: Merge pull request #279 from XeCycle/class-semicolon-elem,
Dmitry Gutov <=
- [elpa] master 8abf087 025/110: Report error for binding initializer outside destructuring, Dmitry Gutov, 2016/06/22
- [elpa] master 4c0408b 032/110: Add NEWS entry for js2-jsx-mode, Dmitry Gutov, 2016/06/22
- [elpa] master bfb83dd 017/110: Refactor: unify computed property name handling, Dmitry Gutov, 2016/06/22
- [elpa] master c63c700 029/110: Update MELPA URL, Dmitry Gutov, 2016/06/22
- [elpa] master a28a648 007/110: Remove await-node for 'awayt' and use unary-node, Dmitry Gutov, 2016/06/22
- [elpa] master 2cf52e9 015/110: js2-parse-highlight-prop-get: Take care now to overwrite the js2-function-call face, Dmitry Gutov, 2016/06/22
- [elpa] master 3603bc4 018/110: Add test on shorthand method name and scoping, Dmitry Gutov, 2016/06/22
- [elpa] master 0555a8a 024/110: Support initializer in destructuring, Dmitry Gutov, 2016/06/22
- [elpa] master 1f95553 033/110: Add js2-jsx-mode usage instructions, Dmitry Gutov, 2016/06/22
- [elpa] master 47b215d 011/110: Define js2-object-property face, Dmitry Gutov, 2016/06/22