aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2014-07-29 16:27:44 +0200
committerColomban Wendling <ban@herbesfolles.org>2014-07-29 16:27:44 +0200
commit0b5e8a111bcbec1ad40d0ac01b75197d371b1a1c (patch)
treebd60bbd3d57ec14e023f2ea8a766ee80ba0df31a
parentd1c3348decc96c34b10eb54837d0bd355021dcba (diff)
downloadscintilla-mirror-0b5e8a111bcbec1ad40d0ac01b75197d371b1a1c.tar.gz
Allow identifier suffix = in Ruby symbol literals
See comments in bug [#1627] for some details.
-rw-r--r--lexers/LexRuby.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx
index b0b52fd77..e9b3cfb0e 100644
--- a/lexers/LexRuby.cxx
+++ b/lexers/LexRuby.cxx
@@ -1285,7 +1285,12 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle,
} else if (state == SCE_RB_CLASS_VAR
|| state == SCE_RB_INSTANCE_VAR
|| state == SCE_RB_SYMBOL) {
- if (state == SCE_RB_SYMBOL && (ch == '!' || ch == '?') && chNext != '=') {
+ if (state == SCE_RB_SYMBOL &&
+ // FIDs suffices '?' and '!'
+ (((ch == '!' || ch == '?') && chNext != '=') ||
+ // identifier suffix '='
+ (ch == '=' && (chNext != '~' && chNext != '>' &&
+ (chNext != '=' || chNext2 == '>'))))) {
styler.ColourTo(i, state);
state = SCE_RB_DEFAULT;
preferRE = false;