[gtksourceview] groovy.lang: correctly highlight slashes after different types of strings



commit d8d5498065939c87a87a9fc038196f48f107d226
Author: Роман Донченко <dpb corrigendum ru>
Date:   Mon Feb 4 02:08:48 2019 +0300

    groovy.lang: correctly highlight slashes after different types of strings
    
    Slashes are interpreted as division operators (and not beginnings of
    slashy strings) after string literals. I had previously implemented this
    for slashes following double-quoted strings, but I evidently forgot
    about other types of string literals.
    
    Implement it for single-quoted and dollar slashy strings, as well.
    
    There are also (non-dollar) slashy strings, but there's no way for us to
    tell if the preceding token is a slashy string or a division operator,
    so that case will have to remain unimplemented.

 data/language-specs/groovy.lang | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/language-specs/groovy.lang b/data/language-specs/groovy.lang
index a991433b..b491121a 100644
--- a/data/language-specs/groovy.lang
+++ b/data/language-specs/groovy.lang
@@ -154,8 +154,8 @@
         # we can't have it match an arbitrary amount of whitespace. Thus, we do an approximate
         # check, only trying zero and one spaces.
 
-        (?&lt;! \+\+   | --   | [])}"\d]   | \%{letter} |
-                \+\+\s | --\s | [])}"\d]\s | \%{letter}\s )
+        (?&lt;! \+\+   | --   | [])}'"\$\d]   | \%{letter} |
+                \+\+\s | --\s | [])}'"\$\d]\s | \%{letter}\s )
 
         /
       </start>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]