branch: elpa/raku-mode
commit c5f3d072e5b5e9b445064d8bf4295d8a04aaaba7
Author: Hinrik Örn Sigurðsson <[email protected]>
Commit: Hinrik Örn Sigurðsson <[email protected]>
Don't highlight string delimiters inside comments
---
perl6-font-lock.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/perl6-font-lock.el b/perl6-font-lock.el
index 124cf6eb33..44231fd244 100644
--- a/perl6-font-lock.el
+++ b/perl6-font-lock.el
@@ -531,6 +531,12 @@ LIMIT can be used to bound the search."
(defun perl6-match-metaoperator (limit)
(perl6-match-property 'perl6-metaoperator nil limit))
+(defun perl6-match-string-delimiter (limit)
+ (perl6-search-when
+ (perl6-rx (or (syntax string-quote) (syntax string-delimiter)))
+ (lambda () (not (eq (perl6-syntax-context) `comment)))
+ limit))
+
(defconst perl6-font-lock-keywords
`(
;; (-) R=> [*] X~ »+«
@@ -640,7 +646,7 @@ LIMIT can be used to bound the search."
(2 'perl6-number-addition)
(3 'perl6-number))
;; highlight string delimiters as operators
- (,(perl6-rx (or (syntax string-quote) (syntax string-delimiter)))
+ (perl6-match-string-delimiter
0 'perl6-operator t))
"Font lock keywords for Perl 6.")