aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexVB.cxx
diff options
context:
space:
mode:
authorJad Altahan <xviyy@aol.com>2019-05-22 16:11:45 +1000
committerJad Altahan <xviyy@aol.com>2019-05-22 16:11:45 +1000
commit9d9bbec07291d768be64a3ea045a4aa656d150ae (patch)
tree65255070de3f5df6f50cb9e44452b3c8e07e3427 /lexers/LexVB.cxx
parent3018a2890c076b33159adc6655586c39e2693b22 (diff)
downloadscintilla-mirror-9d9bbec07291d768be64a3ea045a4aa656d150ae.tar.gz
Support for VB2017 bin literals & digit separators
Diffstat (limited to 'lexers/LexVB.cxx')
-rw-r--r--lexers/LexVB.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/lexers/LexVB.cxx b/lexers/LexVB.cxx
index 3b380c4fd..ceac8d2fe 100644
--- a/lexers/LexVB.cxx
+++ b/lexers/LexVB.cxx
@@ -53,7 +53,7 @@ static inline bool IsANumberChar(int ch) {
// but probably enough in most cases.
return (ch < 0x80) &&
(isdigit(ch) || toupper(ch) == 'E' ||
- ch == '.' || ch == '-' || ch == '+');
+ ch == '.' || ch == '-' || ch == '+' || ch == '_');
}
static void ColouriseVBDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,
@@ -199,6 +199,10 @@ static void ColouriseVBDoc(Sci_PositionU startPos, Sci_Position length, int init
// Octal number
sc.SetState(SCE_B_NUMBER);
sc.Forward();
+ } else if (sc.ch == '&' && tolower(sc.chNext) == 'b') {
+ // Binary number
+ sc.SetState(SCE_B_NUMBER);
+ sc.Forward();
} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
sc.SetState(SCE_B_NUMBER);
} else if (IsAWordStart(sc.ch) || (sc.ch == '[')) {