[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 653661e 220/346: Fix parsing qualified types
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 653661e 220/346: Fix parsing qualified types |
Date: |
Sun, 29 Aug 2021 11:00:34 -0400 (EDT) |
branch: elpa/d-mode
commit 653661eb4c0641c9599fdde630f855565d1b45cc
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Fix parsing qualified types
---
d-mode.el | 11 +++++++++--
tests/fonts_types.d | 2 ++
tests/fonts_types.d.html | 2 ++
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index f42fa5b..ec3c5d8 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: 201909082055
+;; Version: 201909090915
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -1252,12 +1252,19 @@ Key bindings:
(when res
;; D: Skip over template parameters, if any
- (when (looking-at "!") ; TODO: maybe use
c-opt-type-concat-key instead
+ (when (looking-at "!")
(forward-char)
(c-forward-syntactic-ws)
(c-forward-sexp)
(c-forward-syntactic-ws))
+ ;; D: Descend into scope names
+ (when (looking-at "[.]")
+ (forward-char)
+ (c-forward-syntactic-ws)
+ (unless (d-forward-type)
+ (setq res nil)))
+
;; Step over any type suffix operator. Do not let the existence
;; of these alter the classification of the found type, since
;; these operators typically are allowed in normal expressions
diff --git a/tests/fonts_types.d b/tests/fonts_types.d
index d87091e..bd3406b 100644
--- a/tests/fonts_types.d
+++ b/tests/fonts_types.d
@@ -6,3 +6,5 @@ const(Tpl!(int, "", [1, 2, 3])*) var2;
assert(to!string(d) == to!string(double.max));
private void resetFile(string name, scope const(char)[] stdioOpenmode, bool
isPopened) @trusted {}
+
+Parameter!("foo()").Foo var;
diff --git a/tests/fonts_types.d.html b/tests/fonts_types.d.html
index 3d04006..837d207 100644
--- a/tests/fonts_types.d.html
+++ b/tests/fonts_types.d.html
@@ -6,3 +6,5 @@
<span class="keyword">assert</span>(to<span
class="negation-char">!</span><span class="type">string</span>(d) == to<span
class="negation-char">!</span><span class="type">string</span>(<span
class="type">double</span>.max));
<span class="keyword">private</span> <span class="type">void</span> <span
class="function-name">resetFile</span>(<span class="type">string</span> <span
class="variable-name">name</span>, <span class="keyword">scope
const</span>(<span class="type">char</span>)[] <span
class="variable-name">stdioOpenmode</span>, <span class="type">bool</span>
<span class="variable-name">isPopened</span>) <span
class="c-annotation-face">@trusted</span> {}
+
+<span class="type">Parameter</span><span class="negation-char">!</span>(<span
class="string">"foo()"</span>).<span class="type">Foo</span> <span
class="variable-name">var</span>;
- [nongnu] elpa/d-mode cfd1d08 180/346: Use rx-to-string instead of rx-form to support Emacs master (#97), (continued)
- [nongnu] elpa/d-mode cfd1d08 180/346: Use rx-to-string instead of rx-form to support Emacs master (#97), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode af6dbfa 183/346: Generalize StorageClass/VisibilityAttribute parsing in imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2964263 184/346: Fix imenu with alias templates, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 71e8bda 196/346: Improve constructor handling and fix constructor contract indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 28810ef 194/346: Add test for function contracts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1bce6c4 191/346: Somewhat improve fontification of module names, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b413942 198/346: Tighten K&R region detection, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 07cb4d0 199/346: Add d-lineup-arglists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode d3ceb14 200/346: Make d--imenu-rx-def-start a compile-time constant, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0b6a089 217/346: .travis.yml: Try using a emacs-travis.mk which does not use FTP, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 653661e 220/346: Fix parsing qualified types,
ELPA Syncer <=
- [nongnu] elpa/d-mode f07f365 201/346: Fix fontification of constructor parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fd8e70a 209/346: Partially implement D type modifiers (const/immutable/etc.), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8647147 208/346: Fix tests' minimum Emacs versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 9ad04a1 213/346: Fix parsing/fontification of some expressions with periods, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5146f2d 215/346: Clear some cc-mode constants, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 3f669a1 231/346: Replace regex-based imenu implementation with cc-mode-based, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode db2c33f 225/346: Fix parsing of D lambda literals' parameter lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1598b12 248/346: Switch to GPL v3 (or later), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 24fffad 242/346: Fix parsing of declarations after "static else", ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a8aad35 241/346: Fix imenu false positive with "static if", ELPA Syncer, 2021/08/29