[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d1bf11f 068/110: Fix void parsing
From: |
Dmitry Gutov |
Subject: |
[elpa] master d1bf11f 068/110: Fix void parsing |
Date: |
Thu, 23 Jun 2016 01:13:00 +0000 (UTC) |
branch: master
commit d1bf11f83df6b1824ac958b1ec827c5e1d6dfae7
Author: Jackson Hamilton <address@hidden>
Commit: Jackson Hamilton <address@hidden>
Fix void parsing
---
js2-mode.el | 4 +++-
tests/parser.el | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/js2-mode.el b/js2-mode.el
index f574aee..85c3ee9 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -3479,6 +3479,7 @@ The type field inherited from `js2-node' holds the
operator."
(cons js2-INSTANCEOF "instanceof")
(cons js2-DELPROP "delete")
(cons js2-AWAIT "await")
+ (cons js2-VOID "void")
(cons js2-COMMA ",")
(cons js2-COLON ":")
(cons js2-OR "||")
@@ -3580,7 +3581,8 @@ property is added if the operator follows the operand."
(insert op))
(if (or (= tt js2-TYPEOF)
(= tt js2-DELPROP)
- (= tt js2-AWAIT))
+ (= tt js2-AWAIT)
+ (= tt js2-VOID))
(insert " "))
(js2-print-ast (js2-unary-node-operand n) 0)
(when postfix
diff --git a/tests/parser.el b/tests/parser.el
index 50cb521..520ff45 100644
--- a/tests/parser.el
+++ b/tests/parser.el
@@ -126,6 +126,9 @@ the test."
(js2-deftest-parse let-expression-statement
"let (x = 42) x;")
+(js2-deftest-parse void
+ "void 0;")
+
;;; Callers of `js2-valid-prop-name-token'
(js2-deftest-parse parse-property-access-when-not-keyword
- [elpa] master be0b00d 063/110: js2-mode-extend-comment: Don't check that the next line is also commented, (continued)
- [elpa] master be0b00d 063/110: js2-mode-extend-comment: Don't check that the next line is also commented, Dmitry Gutov, 2016/06/22
- [elpa] master 757f91d 065/110: And move its definition below, Dmitry Gutov, 2016/06/22
- [elpa] master 7e0b11f 071/110: Add tests for of parsing, Dmitry Gutov, 2016/06/22
- [elpa] master 83d9890 070/110: Fix await parsing, Dmitry Gutov, 2016/06/22
- [elpa] master bacb022 074/110: Refactor async arrow function matching, Dmitry Gutov, 2016/06/22
- [elpa] master 57dca37 073/110: Refactor await parsing to only parse once, Dmitry Gutov, 2016/06/22
- [elpa] master 60f7a2b 080/110: Fix computed property generator methods indentation, Dmitry Gutov, 2016/06/22
- [elpa] master de6df33 049/110: Fix semicolons and scoping in exported decls, Dmitry Gutov, 2016/06/22
- [elpa] master dbf4fe9 038/110: Adapt async/await changes to latest master, Dmitry Gutov, 2016/06/22
- [elpa] master 7fe7165 053/110: Fix array destructuring including triple-dot, Dmitry Gutov, 2016/06/22
- [elpa] master d1bf11f 068/110: Fix void parsing,
Dmitry Gutov <=
- [elpa] master 7b430a3 079/110: Merge pull request #308 from zmwangx/jsdoc-callback-func-method, Dmitry Gutov, 2016/06/22
- [elpa] master c988876 086/110: Fix the straggler, Dmitry Gutov, 2016/06/22
- [elpa] master 6399bec 001/110: Support ES(7) async/await syntax; Closes #185, Dmitry Gutov, 2016/06/22
- [elpa] master fa0aa09 060/110: Merge pull request #294 from lunaryorn/patch-1, Dmitry Gutov, 2016/06/22
- [elpa] master ec7932d 047/110: Merge pull request #283 from XeCycle/master-with-async, Dmitry Gutov, 2016/06/22
- [elpa] master e44d9e1 088/110: Merge pull request #325 from phst/all-tests, Dmitry Gutov, 2016/06/22
- [elpa] master 812df51 091/110: Merge pull request #326 from phst/compiler-warning-25, Dmitry Gutov, 2016/06/22
- [elpa] master de5b31c 085/110: Fix the tests broken in the previous commit, Dmitry Gutov, 2016/06/22
- [elpa] master f130121 095/110: Merge pull request #328 from XeCycle/iname-color, Dmitry Gutov, 2016/06/22
- [elpa] master 9586f45 096/110: Add :warnings-count keyword argument, Dmitry Gutov, 2016/06/22