branch: elpa/d-mode
commit 1931ec9ee7af6767883452a822914ad3fd98ddad
Merge: b40a7ab a233437
Author: Vladimir Panteleev <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #103 from CyberShadow/pull-20201201-111620
Add "version" to c-block-stmt-2-kwds
---
d-mode.el | 2 +-
tests/I0102.d | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/d-mode.el b/d-mode.el
index 21abce7..eea1dac 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -350,7 +350,7 @@ operators."
(c-lang-defconst c-block-stmt-2-kwds
;; Statement keywords followed by a paren sexp and then by a substatement.
- d '("for" "if" "switch" "while" "catch" "synchronized" "scope"
+ d '("for" "if" "switch" "while" "catch" "synchronized" "scope" "version"
"foreach" "foreach_reverse" "with" "out" "invariant" "unittest"))
(c-lang-defconst c-simple-stmt-kwds
diff --git a/tests/I0102.d b/tests/I0102.d
new file mode 100644
index 0000000..46c4da7
--- /dev/null
+++ b/tests/I0102.d
@@ -0,0 +1,11 @@
+// #min-version: 26.1
+// #run: (d-test-indent)
+
+version (x86) {
+ // Decl
+} else version (x86_64) {
+ // Decls
+} else version (PPC64) {
+ // More decls
+} else
+ static assert(0);