[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode d96a08c 180/352: Refactoring julia-char-regex a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode d96a08c 180/352: Refactoring julia-char-regex as an rx form. |
Date: |
Sun, 29 Aug 2021 11:22:40 -0400 (EDT) |
branch: elpa/julia-mode
commit d96a08c47aca625439e0d09f4e5dc2bf85edc4b6
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>
Refactoring julia-char-regex as an rx form.
This regexp has been simplified from the original. The equivalent rx
form of the original is:
(defconst julia-char-regex
(rx (submatch (or (any "-" ";" "\\" "^" "!" "|" "?" "*" "\\" "<" "%" ","
"=" ">" "+" "/" "&" "$" "\\" "~" "\\" ":")
(syntax open-parenthesis)
(syntax whitespace)
bol))
(submatch "'"
(submatch (or (submatch (*\? (not (any "'"))) (not (any
"\\" "\\")))
(submatch "\\\\")))
"'")))
However, the inner groups are unnecessary and there are repeated "\\"
occurrences.
---
julia-mode.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/julia-mode.el b/julia-mode.el
index a5b6d94..efbc9df 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -110,7 +110,14 @@ This function provides equivalent functionality, but makes
no efforts to optimis
"\"[^\"]*?\\(\\(\\\\\\\\\\)*\\\\\"[^\"]*?\\)*\"")
(defconst julia-char-regex
-
"\\(\\s(\\|\\s-\\|-\\|[,%=<>\\+*/?&|$!\\^~\\\\;:]\\|^\\)\\('\\(\\([^']*?[^\\\\]\\)\\|\\(\\\\\\\\\\)\\)'\\)")
+ (rx (submatch (or (any "-" ";" "\\" "^" "!" "|" "?" "*" "<" "%" "," "=" ">"
"+" "/" "&" "$" "~" ":")
+ (syntax open-parenthesis)
+ (syntax whitespace)
+ bol))
+ (submatch "'"
+ (or (*? (not (any "'"))) (not (any "\\"))
+ "\\\\")
+ "'")))
(defconst julia-unquote-regex
"\\(\\s(\\|\\s-\\|-\\|[,%=<>\\+*/?&|!\\^~\\\\;:]\\|^\\)\\($[a-zA-Z0-9_]+\\)")
- [nongnu] elpa/julia-mode 7de3b0c 330/352: Remove highlighting for :: and <:. (#112), (continued)
- [nongnu] elpa/julia-mode 7de3b0c 330/352: Remove highlighting for :: and <:. (#112), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 1c122f1 328/352: Fix multiple type face highlighting. Add tests. (#110), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6e9e60b 327/352: Fix forloop matching on == instead of = (#105), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ac22747 178/352: remove trailing ws from repo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c3d3e3a 182/352: Don't call parse-partial-sexp to find the last opening paren., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c45c786 335/352: Add more tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 549a7b4 341/352: Remove C_NULL from constants and add Cvoid, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 13a3c53 344/352: Merge branch 'master' into triple-quote-cmd, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ac7431c 174/352: Mark @ and ! as a symbol constituents, as suggested by @Clemens-H., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ac55340 175/352: Factoring out a types regex., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d96a08c 180/352: Refactoring julia-char-regex as an rx form.,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 76d5d75 183/352: Optimising julia-at-keyword., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9cdad57 187/352: Make julia-char-regex stricter., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ff5fc36 202/352: julia-mode.el: allow space or no space after :: and <:, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 05f002c 203/352: When indenting code, limit how far back we search., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 70bbe82 204/352: Adding unit tests for indentation., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ff8adf5 221/352: Add tests for #11684. [ci skip], ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8ab2a60 222/352: julia-paren-indent skips blanks after paren, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c8dfbe2 227/352: Declare indentation as customizable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 011435c 237/352: julia-mode: Fix indent for hanging ops and module, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c2f0ed8 235/352: julia-mode: Fix prompt regexp, ELPA Syncer, 2021/08/29