[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swift-mode 1a1d81c 125/496: Improve font-lock regex for st
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swift-mode 1a1d81c 125/496: Improve font-lock regex for string interpolation |
Date: |
Sun, 29 Aug 2021 11:33:21 -0400 (EDT) |
branch: elpa/swift-mode
commit 1a1d81c61de79f2fc03332ee6d8d4c401ac9891f
Author: ap4y <lod@pisem.net>
Commit: ap4y <lod@pisem.net>
Improve font-lock regex for string interpolation
---
swift-mode.el | 2 +-
test/font-lock-tests.el | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/swift-mode.el b/swift-mode.el
index 84d00be..dd93a34 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -405,7 +405,7 @@
(remove-text-properties start end '(swift-interpolation-match-data))
(funcall
(syntax-propertize-rules
- ((rx (group "\\(" (*? any) ")"))
+ ((rx (group "\\(" (* (any alnum " " "(" ")" "+" "-" "*" "/")) ")"))
(0 (ignore (swift-syntax-propertize-interpolation)))))
start end)))
diff --git a/test/font-lock-tests.el b/test/font-lock-tests.el
index ed760d4..d4daffc 100644
--- a/test/font-lock-tests.el
+++ b/test/font-lock-tests.el
@@ -188,6 +188,8 @@ test will fail."
(check-face string-interpolation/has-variable-face/1
font-lock-variable-name-face "\"foo {{\\\(bar)}}\"")
(check-face string-interpolation/has-variable-face/2
font-lock-variable-name-face "\"{{\\\(bar)}}\"")
+(check-face string-interpolation/has-variable-face/3
font-lock-variable-name-face "\"\\\(bar\(1\){{\)}}\"")
+(check-face string-interpolation/has-variable-face/4
font-lock-variable-name-face "\"\\\(bar\(1\){{ + baz\(2\)\)}}\"")
(check-face string-interpolation/after-has-string-face/2 font-lock-string-face
"\"(foo \\\(bar){{baz}}\")")
(check-face self/has-keyword-face/1 font-lock-keyword-face "{{self}}.foo")
- [nongnu] elpa/swift-mode 0cb5e13 303/496: Improve some wording, (continued)
- [nongnu] elpa/swift-mode 0cb5e13 303/496: Improve some wording, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode b6f3664 302/496: Update a few URLs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9c180cf 315/496: Fix testing error when running the test twice interactively, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 2955e8f 314/496: Simplify indentation for commas, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 8e69064 034/496: Mention package.el as an installation option, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cfb3a6f 045/496: Setup some basic code style conventions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 7ea5f66 059/496: Fix markdown formatting typo, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cd0aa34 072/496: Adding flycheck plugin for syntax check with swift cli, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 14c6bdd 079/496: Add swift repl commands to mode map, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1dfb1a5 110/496: Add indent rules for function declaration with attributes, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 1a1d81c 125/496: Improve font-lock regex for string interpolation,
ELPA Syncer <=
- [nongnu] elpa/swift-mode 4059bc1 135/496: Add dot(.) to the allowed symbols inside string interpolation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 88a83ad 145/496: Apply DECSPEC token class only for functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode fc009b5 069/496: Add font locking for indentation tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode ae32a8b 071/496: Add basic imenu support, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode d02e2dc 024/496: Update contributors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode fc64626 156/496: Merge pull request #56 from ap4y/fix_flycheck_issues, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 9cf667c 159/496: Start work on 0.4, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode cba4538 161/496: Merge pull request #61 from ckruse/fix_55, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 5611c0f 164/496: Updated syntax: a lot of attributes moved to keywords, ELPA Syncer, 2021/08/29
- [nongnu] elpa/swift-mode 250e8e4 172/496: Merge pull request #67 from jmibanez/fix-flycheck-and-byte-compilation-bug, ELPA Syncer, 2021/08/29