[gtksourceview/gnome-3-24] groovy.lang: correctly highlight slashes after different types of strings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/gnome-3-24] groovy.lang: correctly highlight slashes after different types of strings
- Date: Thu, 7 Feb 2019 01:36:49 +0000 (UTC)
commit de8330eae9654d6956d5ce8bcbdecf6b3656b830
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.
- (?<! \+\+ | -- | [])}"\d] | \%{letter} |
- \+\+\s | --\s | [])}"\d]\s | \%{letter}\s )
+ (?<! \+\+ | -- | [])}'"\$\d] | \%{letter} |
+ \+\+\s | --\s | [])}'"\$\d]\s | \%{letter}\s )
/
</start>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]