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

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

[nongnu] elpa/d-mode a731ae6 157/346: Fix imenu for functions with param


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode a731ae6 157/346: Fix imenu for functions with parameter types containing parens
Date: Sun, 29 Aug 2021 11:00:21 -0400 (EDT)

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

    Fix imenu for functions with parameter types containing parens
    
    Support one-level-deep parens in parameters for now.
---
 d-mode.el     | 11 +++++++++--
 tests/imenu.d |  5 ++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/d-mode.el b/d-mode.el
index 4d6829a..585dfbe 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
 ;; Maintainer:  Russel Winder <russel@winder.org.uk>
 ;;              Vladimir Panteleev <vladimir@thecybershadow.net>
 ;; Created:  March 2007
-;; Version:  201610111901
+;; Version:  201610111913
 ;; Keywords:  D programming language emacs cc-mode
 
 ;;;; NB Version number is date and time yyyymmddhhMM UTC.
@@ -491,7 +491,14 @@ The expression is added to 
`compilation-error-regexp-alist' and
     (zero-or-more (syntax whitespace)))
 
    ;; Arguments
-   "(" (zero-or-more (not (any ")"))) ")"
+   "("
+   (zero-or-more (not (any "()")))
+   (zero-or-more
+    "("
+    (one-or-more (not (any "()")))
+    ")"
+    (zero-or-more (not (any "()"))))
+   ")"
    (zero-or-more (syntax whitespace))
 
    ;; Pure/const etc.
diff --git a/tests/imenu.d b/tests/imenu.d
index 0ebddb2..34c2b55 100644
--- a/tests/imenu.d
+++ b/tests/imenu.d
@@ -1,5 +1,5 @@
 // #run: (d-test-get-imenu-lines)
-// #out: (4 6 11 14 17)
+// #out: (4 6 11 14 17 19)
 
 void foo(int x) {}
 
@@ -15,3 +15,6 @@ extern (C) int rt_init()
 {}
 
 Duration dur(string units)(long length) @safe pure nothrow @nogc {}
+
+void test(const(char)* str)
+{}



reply via email to

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