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 | 6a036ac8001e1a740fd28323ea22d6acfbd29877 (patch) | |
| tree | b516b442fb6ed91bd68511ab6ef697803861ffcf /lexers/LexCPP.cxx | |
| parent | 45a093223eb08aed5bf0a85dbcf1b986f9750ee6 (diff) | |
| download | scintilla-mirror-6a036ac8001e1a740fd28323ea22d6acfbd29877.tar.gz | |
Backport: Replace islower function and add tests for JavaScript regular expressions.
Backport of changeset 8143:a5eb440dc1e2.
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 2fbbf7151..10e38c661 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)) { |
