diff options
author | Jad Altahan <xviyy@aol.com> | 2019-05-22 16:11:45 +1000 |
---|---|---|
committer | Jad Altahan <xviyy@aol.com> | 2019-05-22 16:11:45 +1000 |
commit | 9ea53d08ad3e3fcba48a608690efd5cd48c32c55 (patch) | |
tree | fd3ad676b3b3de51b9a211da5a641a85dfee91dd /lexers/LexVB.cxx | |
parent | 0c13bb0159ba453211718d2c33c962155f4fd106 (diff) | |
download | scintilla-mirror-9ea53d08ad3e3fcba48a608690efd5cd48c32c55.tar.gz |
Backport: Support for VB2017 bin literals & digit separators
Backport of changeset 7502:395c5832d38c.
Diffstat (limited to 'lexers/LexVB.cxx')
-rw-r--r-- | lexers/LexVB.cxx | 6 |
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 == '[')) { |