[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode c6e2c9a 129/346: Convert d-imenu-method-name-patter
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode c6e2c9a 129/346: Convert d-imenu-method-name-pattern to rx expression |
Date: |
Sun, 29 Aug 2021 11:00:16 -0400 (EDT) |
branch: elpa/d-mode
commit c6e2c9a52027cf7037975ba9af5c19c00247b69a
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Convert d-imenu-method-name-pattern to rx expression
Syntax-only, there should be no change in functionality.
---
d-mode.el | 48 +++++++++++++++++++++++++++++++++++++++---------
1 file changed, 39 insertions(+), 9 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index 5c955b6..ab1ea71 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -460,15 +460,45 @@ The expression is added to
`compilation-error-regexp-alist' and
(cons "D" (c-lang-const c-mode-menu d)))
(defconst d-imenu-method-name-pattern
- (concat
- "^\\s-*"
- "\\(?:[_a-z@]+\\s-+\\)*" ; qualifiers
- "\\([][_a-zA-Z0-9.*!]+\\)\\s-+" ; type
- "\\([_a-zA-Z0-9]+\\)\\s-*" ; function name
- "\\(?:([^)]*)\\s-*\\)?" ; type arguments
- "([^)]*)\\s-*" ; arguments
- "\\(?:[a-z@]+\\s-*\\)?" ; pure/const etc.
- "\\(?:;\\|[ \t\n]*\\(?:if\\|{\\)\\)")) ; ';' or 'if' or '{'
+ (rx
+ ;; Whitespace
+ bol
+ (zero-or-more (syntax whitespace))
+
+ ;; Qualifiers
+ (zero-or-more
+ (one-or-more (any "a-z_@"))
+ (one-or-more (syntax whitespace)))
+
+ ;; Type
+ (group
+ (one-or-more (any "a-zA-Z0-9_.*![]")))
+ (one-or-more (syntax whitespace))
+
+ ;; Function name
+ (group
+ (one-or-more (any "a-zA-Z0-9_")))
+ (zero-or-more (syntax whitespace))
+
+ ;; Type arguments
+ (zero-or-one
+ "(" (zero-or-more (not (any ")"))) ")"
+ (zero-or-more (syntax whitespace)))
+
+ ;; Arguments
+ "(" (zero-or-more (not (any ")"))) ")"
+ (zero-or-more (syntax whitespace))
+
+ ;; Pure/const etc.
+ (zero-or-one
+ (one-or-more (any "a-z@"))
+ (zero-or-more (syntax whitespace)))
+
+ ;; ';' or 'if' or '{'
+ (or
+ ";"
+ (and (zero-or-more (any " \t\n")) (or "if" "{")))
+ ))
(defun d-imenu-method-index-function ()
(and
- [nongnu] elpa/d-mode c4d8ba8 099/346: Fix omission of final/abstract classes in imenu, (continued)
- [nongnu] elpa/d-mode c4d8ba8 099/346: Fix omission of final/abstract classes in imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 9729d5f 103/346: Merge pull request #62 from CyberShadow/pull-20160328-152551, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2d014ef 106/346: Add .cask to .gitignore., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 830a070 095/346: Merge pull request #51 from dmakarov/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b682601 118/346: Document cl compilation warning, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode efc92aa 120/346: tests: Add test for GitHub pull request #72, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 7c3bcdc 124/346: tests: Split test for #72 to its own file, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c881155 126/346: .travis.yml: Switch to a different PPA in order to test on Emacs 25, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode eb92e64 127/346: .travis.yml: Switch to emacs-travis.mk, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fef0def 128/346: tests: Add basic imenu test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c6e2c9a 129/346: Convert d-imenu-method-name-pattern to rx expression,
ELPA Syncer <=
- [nongnu] elpa/d-mode 2fd4691 133/346: tests: Disable #35 indentation test on Emacs 24.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 671ee7c 135/346: tests: Tweak version condition for #35 test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode d219e0e 139/346: README: Update Coveralls badge, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 53eac10 140/346: tests: Test paren-less calls as well in test for issue #26, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5547400 142/346: Update package version, and link to script to do it automatically, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5dbec4a 146/346: Convert backquote-in-backtick-string regexp to rx, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode daf5e05 149/346: Add basic fontification test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8318eef 151/346: tests: Work around 24.3 oddity to fix fontification tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0f3bf01 150/346: tests: Use an older variable name to fix pre-25.1 fontification tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6db43b2 153/346: tests: Add additional tests for #30, ELPA Syncer, 2021/08/29