branch: elpa/swift-mode commit 2eb3952b737fd380555894ecef2be01f983b7963 Merge: 18ea989 4059bc1 Author: Bozhidar Batsov <bozhidar.bat...@gmail.com> Commit: Bozhidar Batsov <bozhidar.bat...@gmail.com>
Merge pull request #45 from ap4y/dot_in_string_interpolation Add dot(.) to the allowed symbols inside string interpolation --- swift-mode.el | 2 +- test/font-lock-tests.el | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/swift-mode.el b/swift-mode.el index d6f2f24..370f78b 100644 --- a/swift-mode.el +++ b/swift-mode.el @@ -420,7 +420,7 @@ (remove-text-properties start end '(swift-interpolation-match-data)) (funcall (syntax-propertize-rules - ((rx (group "\\(" (* (any alnum " " "(" ")" "+" "-" "*" "/" "_")) ")")) + ((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 8fd4b33..169b90f 100644 --- a/test/font-lock-tests.el +++ b/test/font-lock-tests.el @@ -191,6 +191,7 @@ test will fail." (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/has-variable-face/5 font-lock-variable-name-face "\"foo {{\\\(bar_baz)}}\"") +(check-face string-interpolation/has-variable-face/6 font-lock-variable-name-face "\"foo {{\\\(bar.baz)}}\"") (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")