[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/zig-mode 085bd30 081/104: Revert "Use rx macro and add mor
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/zig-mode 085bd30 081/104: Revert "Use rx macro and add more possibilities for type annotations" |
Date: |
Sun, 29 Aug 2021 11:37:07 -0400 (EDT) |
branch: elpa/zig-mode
commit 085bd30d41b5742d9fa95db8884d6e63ba60cbc0
Author: joachimschmidt557 <joachim.schmidt557@outlook.com>
Commit: joachimschmidt557 <joachim.schmidt557@outlook.com>
Revert "Use rx macro and add more possibilities for type annotations"
This reverts commit 859a4dc4b71c6556bd3fadf61e0239ae72360aa2.
---
zig-mode.el | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/zig-mode.el b/zig-mode.el
index 7a44807..9ec00d1 100644
--- a/zig-mode.el
+++ b/zig-mode.el
@@ -130,24 +130,23 @@ If given a SOURCE, execute the CMD on it."
(compilation-mode))
(revert-buffer :ignore-auto :noconfirm)))))))
-(defconst zig-re-identifier
- (rx (any "_" word)
- (* (any "_" word digit))))
+(defun zig-re-word (inner)
+ "Construct a regular expression for the word INNER."
+ (concat "\\<" inner "\\>"))
-(defconst zig-re-type
- (rx (* (| "?" "[_]" "*" "[]"))
- (regexp zig-re-identifier)))
+(defun zig-re-grab (inner)
+ "Construct a group regular expression for INNER."
+ (concat "\\(" inner "\\)"))
+(defconst zig-re-identifier "[[:word:]_][[:word:]_[:digit:]]*")
(defconst zig-re-type-annotation
- (rx (group (regexp zig-re-identifier))
- (* (any space)) ":" (* (any space))
- (group (regexp zig-re-type))))
+ (concat (zig-re-grab zig-re-identifier)
+ "[[:space:]]*:[[:space:]]*"
+ (zig-re-grab zig-re-identifier)))
(defun zig-re-definition (dtype)
"Construct a regular expression for definitions of type DTYPE."
- (rx bow (literal dtype) eow
- (+ (any space))
- (group (regexp zig-re-identifier))))
+ (concat (zig-re-word dtype) "[[:space:]]+" (zig-re-grab zig-re-identifier)))
(defconst zig-mode-syntax-table
(let ((table (make-syntax-table)))
@@ -386,10 +385,10 @@ If given a SOURCE, execute the CMD on it."
;;; Imenu support
(defun zig-re-structure-def-imenu (stype)
"Construct a regular expression for strucutres definitions of type STYPE."
- (rx bow "const" eow (+ (any space))
- (group (regexp zig-re-identifier))
- (* not-newline)
- bow (literal stype) eow))
+ (concat (zig-re-word "const") "[[:space:]]+"
+ (zig-re-grab zig-re-identifier)
+ ".*"
+ (zig-re-word stype)))
(defvar zig-imenu-generic-expression
(append (mapcar (lambda (x)
- [nongnu] elpa/zig-mode 0a150f2 054/104: Merge pull request #19 from mgxm/fix_multiline_string, (continued)
- [nongnu] elpa/zig-mode 0a150f2 054/104: Merge pull request #19 from mgxm/fix_multiline_string, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 64994f1 053/104: Merge pull request #17 from xuchunyang/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9609cc3 055/104: Merge pull request #21 from SerialDev/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode fab1924 066/104: fix test regression, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode f9e5c57 065/104: Merge pull request #28 from justjosias/pre-doc-comment, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 2426668 070/104: Remove `this` constant, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode e110c29 073/104: Merge pull request #29 from joachimschmidt557/test-regression, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 6d78a6e 074/104: Fix appveyor.yml, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9b44e04 075/104: Merge pull request #38 from mdsteele/appveyor, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 6f10653 085/104: Merge pull request #41 from dedifferentiator/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 085bd30 081/104: Revert "Use rx macro and add more possibilities for type annotations",
ELPA Syncer <=
- [nongnu] elpa/zig-mode ffaffb7 077/104: Merge pull request #31 from joachimschmidt557/hide-zig-fmt-window, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9be8b72 080/104: upd: zig test flags, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 68f3fc5 087/104: Update the required emacs version from 24 to 24.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode d263591 090/104: Account for opening brace after newline, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 07efab0 095/104: Merge pull request #48 from noisegul/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode b6abeb4 093/104: Add a defvar to define if user wants to return to buffer after fmt., ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode df572da 099/104: Add opaque keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode acf3ee8 104/104: Add GitHub Actions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 2842797 007/104: Fix builtins. Reorder tables., ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode e69ebc0 012/104: and, or, @panic., ELPA Syncer, 2021/08/29