emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/d-mode a233437 329/346: Add "version" to c-block-stmt-2-kw


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode a233437 329/346: Add "version" to c-block-stmt-2-kwds
Date: Sun, 29 Aug 2021 11:00:54 -0400 (EDT)

branch: elpa/d-mode
commit a2334379839dd7ce06360dd57a48859271bf75e4
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>

    Add "version" to c-block-stmt-2-kwds
    
    Fix #102.
---
 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]