diff options
author | Neil <nyamatongwe@gmail.com> | 2020-04-13 07:41:08 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-04-13 07:41:08 +1000 |
commit | 1769cc3907d3f06254053ab76bd9e827417f07cf (patch) | |
tree | 58230e7b09fd443c78e05121a50635bbd30970f8 /lexers/LexCPP.cxx | |
parent | 86d705bdc57ed92b36824229ff441bab7483f4ba (diff) | |
download | scintilla-mirror-1769cc3907d3f06254053ab76bd9e827417f07cf.tar.gz |
Replace islower function and add tests for JavaScript regular expressions.
Diffstat (limited to 'lexers/LexCPP.cxx')
-rw-r--r-- | lexers/LexCPP.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index a839f020a..af60dce3a 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -9,7 +9,6 @@ #include <cstdlib> #include <cassert> #include <cstring> -#include <cctype> #include <utility> #include <string> @@ -1160,9 +1159,9 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i case SCE_C_REGEX: if (sc.atLineStart) { sc.SetState(SCE_C_DEFAULT|activitySet); - } else if (! inRERange && sc.ch == '/') { + } else if (!inRERange && sc.ch == '/') { sc.Forward(); - while ((sc.ch < 0x80) && islower(sc.ch)) + while (IsLowerCase(sc.ch)) sc.Forward(); // gobble regex flags sc.SetState(SCE_C_DEFAULT|activitySet); } else if (sc.ch == '\\' && ((sc.currentPos+1) < lineEndNext)) { |