Merge pull request #4353 from RaiKoHoff/Dev_Master

Update Lexilla Lib v5.2.1
This commit is contained in:
Rainer Kottenhoff 2022-12-09 13:22:14 +01:00 committed by GitHub
commit 464beee630
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 263 additions and 77 deletions

View File

@ -9,7 +9,7 @@
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
<meta name="Description"
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
<meta name="Date.Modified" content="20221012" />
<meta name="Date.Modified" content="20221206" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
.logo {
@ -61,8 +61,8 @@
<font color="#FFCC99" size="4"> A library of language lexers for use with Scintilla</font>
</td>
<td width="40%" align="right">
<font color="#FFCC99" size="3">Release version 5.2.0<br />
Site last modified October 12 2022</font>
<font color="#FFCC99" size="3">Release version 5.2.1<br />
Site last modified December 6 2022</font>
</td>
<td width="20%">
&nbsp;
@ -77,6 +77,7 @@
</tr>
</table>
<ul id="versionlist">
<li>Version 5.2.1 improves Batch, F#, Markdown, and PowerShell.</li>
<li>Version 5.2.0 improves PowerShell and R.</li>
<li>Version 5.1.9 improves Julia and Properties.</li>
<li>Version 5.1.8 improves F#, MS SQL, PowerShell, and Visual Prolog.</li>

View File

@ -26,9 +26,9 @@
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
<tr>
<td>
<font size="4"> <a href="https://www.scintilla.org/lexilla520.zip">
<font size="4"> <a href="https://www.scintilla.org/lexilla521.zip">
Windows</a>&nbsp;&nbsp;
<a href="https://www.scintilla.org/lexilla520.tgz">
<a href="https://www.scintilla.org/lexilla521.tgz">
GTK/Linux</a>&nbsp;&nbsp;
</font>
</td>
@ -42,7 +42,7 @@
containing very few restrictions.
</p>
<h3>
Release 5.2.0
Release 5.2.1
</h3>
<h4>
Source Code
@ -50,8 +50,8 @@
The source code package contains all of the source code for Lexilla but no binary
executable code and is available in
<ul>
<li><a href="https://www.scintilla.org/lexilla520.zip">zip format</a> (1.2M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/lexilla520.tgz">tgz format</a> (0.9M) commonly used on Linux and compatible operating systems</li>
<li><a href="https://www.scintilla.org/lexilla521.zip">zip format</a> (1.2M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/lexilla521.tgz">tgz format</a> (0.9M) commonly used on Linux and compatible operating systems</li>
</ul>
Instructions for building on both Windows and Linux are included in the readme file.
<h4>

View File

@ -585,6 +585,43 @@
</tr>
</table>
<h2>Releases</h2>
<h3>
<a href="https://www.scintilla.org/lexilla521.zip">Release 5.2.1</a>
</h3>
<ul>
<li>
Released 6 December 2022.
</li>
<li>
Update to Unicode 14.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1461/">Feature #1461</a>.
</li>
<li>
Change default compilation optimization option to favour speed over space.
-O2 for MSVC and -O3 for gcc and clang.
</li>
<li>
Batch: Fix comments starting inside strings.
<a href="https://github.com/ScintillaOrg/lexilla/issues/115">Issue #115</a>.
</li>
<li>
F#: Lex signed numeric literals more accurately.
<a href="https://github.com/ScintillaOrg/lexilla/issues/110">Issue #110</a>,
<a href="https://github.com/ScintillaOrg/lexilla/issues/111">Issue #111</a>.
</li>
<li>
F#: Add specifiers for 64-bit integer and floating point literals.
<a href="https://github.com/ScintillaOrg/lexilla/issues/112">Issue #112</a>.
</li>
<li>
Markdown: Stop styling numbers at line start in PRECHAR style.
<a href="https://github.com/ScintillaOrg/lexilla/issues/117">Issue #117</a>.
</li>
<li>
PowerShell: Recognise numeric literals more accurately.
<a href="https://github.com/ScintillaOrg/lexilla/issues/118">Issue #118</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/lexilla520.zip">Release 5.2.0</a>
</h3>
@ -1804,7 +1841,7 @@
</li>
<li>
SciTE supports changing caret style via caret.style property.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1264/">Feature #1624</a>.
<a href="https://sourceforge.net/p/scintilla/feature-requests/1264/">Feature #1264</a>.
</li>
<li>
Lexer added for .NET's Common Intermediate Language CIL.
@ -2303,15 +2340,15 @@
</li>
<li>
Minor undefined behaviour fixed.
<a href="https://sourceforge.net/p/scintilla/bugs/1978">Bug #1978</a>.
<a href="https://sourceforge.net/p/scintilla/bugs/1978/">Bug #1978</a>.
</li>
<li>
On Cocoa, improve scrolling on macOS 10.12.
<a href="https://sourceforge.net/p/scintilla/bugs/1885">Bug #1885</a>.
<a href="https://sourceforge.net/p/scintilla/bugs/1885/">Bug #1885</a>.
</li>
<li>
On Cocoa, fix line selection by clicking in the margin when scrolled.
<a href="https://sourceforge.net/p/scintilla/bugs/1971">Bug #1971</a>.
<a href="https://sourceforge.net/p/scintilla/bugs/1971/">Bug #1971</a>.
</li>
</ul>
<h3>
@ -2396,7 +2433,7 @@
</li>
<li>
On GTK+ fix drawing problems including incorrect scrollbar redrawing and flickering of text.
<a href="https://sourceforge.net/p/scintilla/bugs/1876">Bug #1876</a>.
<a href="https://sourceforge.net/p/scintilla/bugs/1876/">Bug #1876</a>.
</li>
<li>
On Linux, both for GTK+ and Qt, the default modifier key for rectangular selection is now Alt.
@ -2407,7 +2444,7 @@
<li>
On Cocoa, fix doCommandBySelector but avoid double effect of 'delete'
key.
<a href="https://sourceforge.net/p/scintilla/bugs/1958">Bug #1958</a>.
<a href="https://sourceforge.net/p/scintilla/bugs/1958/">Bug #1958</a>.
</li>
<li>
On Qt, the updateUi signal includes the 'updated' flags.
@ -5460,7 +5497,7 @@
</li>
<li>
Added ncurses platform definitions. Implementation is maintained separately as
<a href="https://foicica.com/scinterm/">Scinterm</a>.
<a href="https://orbitalquark.github.io/scinterm">Scinterm</a>.
</li>
</ul>
<h3>

View File

@ -74,15 +74,21 @@ bool textQuoted(const char *lineBuffer, Sci_PositionU endPos) {
char strBuffer[1024];
strncpy(strBuffer, lineBuffer, endPos);
strBuffer[endPos] = '\0';
char *pQuote;
pQuote = strchr(strBuffer, '"');
bool CurrentStatus = false;
const char strQuotes[] = "\"'";
const size_t strLength = strlen(strQuotes);
for (size_t i = 0; i < strLength; i++) {
const char *pQuote = strchr(strBuffer, strQuotes[i]);
while (pQuote != NULL)
{
if (!IsEscaped(strBuffer, pQuote - strBuffer)) {
CurrentStatus = !CurrentStatus;
}
pQuote = strchr(pQuote + 1, '"');
pQuote = strchr(pQuote + 1, strQuotes[i]);
}
if (CurrentStatus) {
break;
}
}
return CurrentStatus;
}
@ -196,9 +202,11 @@ void ColouriseBatchDoc(
// Check for Comment - return if found
if (continueProcessing) {
if ((CompareCaseInsensitive(wordBuffer, "rem") == 0) || (wordBuffer[0] == ':' && wordBuffer[1] == ':')) {
styler.ColourTo(startLine + offset - strlen(wordBuffer) - 1, SCE_BAT_DEFAULT);
if ((offset == wbl) || !textQuoted(lineBuffer, offset - wbl)) {
styler.ColourTo(startLine + offset - wbl - 1, SCE_BAT_DEFAULT);
styler.ColourTo(endPos, SCE_BAT_COMMENT);
break;
}
}
}
// Check for Separator

View File

@ -33,6 +33,41 @@ static inline bool IsAWordChar(int ch) noexcept {
return ch >= 0x80 || isalnum(ch) || ch == '-' || ch == '_';
}
static bool IsNumericLiteral(int chPrev, int ch, int chNext) {
// integers
if (ch >= '0' && ch <= '9') {
return true;
}
// hex 0x or a-f
if ((ch == 'x' && chPrev == '0') || (ch >= 'a' && ch <= 'f')) {
return true;
}
// decimal point
if (ch == '.' && chNext != '.') {
return true;
}
// optional -/+ sign after exponent
if ((ch == '+' || ch == '-') && chPrev == 'e') {
return true;
}
// suffix
switch (ch) {
//case 'b': see hex
case 'g':
case 'k':
case 'l':
case 'm':
case 'n':
case 'p':
case 's':
case 't':
case 'u':
case 'y':
return true;
}
return false;
}
static void ColourisePowerShellDoc(Sci_PositionU startPos, Sci_Position length, int initStyle,
WordList *keywordlists[], Accessor &styler) {
@ -99,8 +134,14 @@ static void ColourisePowerShellDoc(Sci_PositionU startPos, Sci_Position length,
sc.SetState(SCE_POWERSHELL_DEFAULT);
}
} else if (sc.state == SCE_POWERSHELL_NUMBER) {
if (!IsADigit(sc.ch)) {
if (!IsNumericLiteral(MakeLowerCase(sc.chPrev),
MakeLowerCase(sc.ch),
MakeLowerCase(sc.chNext))) {
if (sc.MatchLineEnd() || IsASpaceOrTab(sc.ch) || isoperator(sc.ch)) {
sc.SetState(SCE_POWERSHELL_DEFAULT);
} else {
sc.ChangeState(SCE_POWERSHELL_IDENTIFIER);
}
}
} else if (sc.state == SCE_POWERSHELL_VARIABLE) {
if (!IsAWordChar(sc.ch)) {
@ -146,7 +187,7 @@ static void ColourisePowerShellDoc(Sci_PositionU startPos, Sci_Position length,
sc.SetState(SCE_POWERSHELL_HERE_CHARACTER);
} else if (sc.ch == '$') {
sc.SetState(SCE_POWERSHELL_VARIABLE);
} else if (IsADigit(sc.ch) || (sc.ch == '.' && IsADigit(sc.chNext))) {
} else if (IsADigit(sc.ch) || (sc.chPrev != '.' && sc.ch == '.' && IsADigit(sc.chNext))) {
sc.SetState(SCE_POWERSHELL_NUMBER);
} else if (isoperator(sc.ch)) {
sc.SetState(SCE_POWERSHELL_OPERATOR);

View File

@ -367,6 +367,9 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int
sc.SetState(SCE_MARKDOWN_OLIST_ITEM);
sc.Forward(digitCount + 1);
sc.SetState(SCE_MARKDOWN_DEFAULT);
} else {
// a textual number at the margin should be plain text
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
// Alternate Ordered list

View File

@ -387,6 +387,9 @@ static void ColorizeMarkdownDoc(Sci_PositionU startPos, Sci_Position length, int
sc.SetState(SCE_MARKDOWN_OLIST_ITEM);
sc.Forward(digitCount + 1);
sc.SetState(SCE_MARKDOWN_DEFAULT);
} else {
// a textual number at the margin should be plain text
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
// Alternate Ordered list

View File

@ -20,7 +20,7 @@ namespace {
const int catRanges[] = {
//++Autogenerated -- start of section automatically generated
// Created with Python 3.9.4, Unicode 13.0.0
// Created with Python 3.11.0, Unicode 14.0.0
25,
1046,
1073,
@ -683,8 +683,7 @@ const int catRanges[] = {
49669,
50033,
50074,
50109,
50129,
50097,
50180,
51203,
51236,
@ -749,11 +748,16 @@ const int catRanges[] = {
68605,
68612,
68989,
69124,
69908,
69924,
70141,
70170,
70237,
70405,
70660,
71357,
71364,
71965,
72293,
71971,
72005,
72794,
72805,
73830,
@ -986,6 +990,7 @@ const int catRanges[] = {
99645,
99652,
100189,
100229,
100260,
100293,
100390,
@ -998,6 +1003,8 @@ const int catRanges[] = {
101117,
101124,
101245,
101284,
101341,
101380,
101445,
101533,
@ -1034,7 +1041,7 @@ const int catRanges[] = {
104925,
105126,
105213,
105412,
105380,
105469,
105476,
105541,
@ -1287,12 +1294,12 @@ const int catRanges[] = {
187940,
188221,
188420,
188861,
188868,
188997,
189117,
189444,
189094,
189149,
189412,
190021,
190086,
190129,
190205,
190468,
@ -1328,7 +1335,7 @@ const int catRanges[] = {
196849,
196965,
197082,
197117,
197093,
197128,
197469,
197636,
@ -1403,7 +1410,7 @@ const int catRanges[] = {
218629,
219079,
219109,
219197,
219645,
221189,
221318,
221348,
@ -1416,13 +1423,14 @@ const int catRanges[] = {
223301,
223334,
223396,
223645,
223677,
223752,
224081,
224309,
224613,
224917,
225213,
225201,
225277,
225285,
225350,
225380,
@ -1487,8 +1495,6 @@ const int catRanges[] = {
241441,
242531,
243717,
245597,
245605,
245760,
245793,
245824,
@ -1850,7 +1856,7 @@ const int catRanges[] = {
266755,
267197,
267283,
268317,
268349,
268805,
269223,
269349,
@ -2030,9 +2036,7 @@ const int catRanges[] = {
357085,
357109,
360448,
361981,
361985,
363517,
363520,
363553,
363584,
@ -2233,7 +2237,16 @@ const int catRanges[] = {
378993,
379413,
379473,
379517,
379565,
379598,
379629,
379662,
379693,
379726,
379757,
379790,
379820,
379869,
380949,
381789,
381813,
@ -2321,8 +2334,6 @@ const int catRanges[] = {
425988,
636949,
638980,
1310653,
1310724,
1311395,
1311428,
1348029,
@ -2566,7 +2577,8 @@ const int catRanges[] = {
1374113,
1374144,
1374177,
1374237,
1374208,
1374241,
1374272,
1374305,
1374336,
@ -2574,6 +2586,18 @@ const int catRanges[] = {
1374496,
1374529,
1374589,
1374720,
1374753,
1374813,
1374817,
1374877,
1374881,
1374912,
1374945,
1374976,
1375009,
1375069,
1375811,
1375904,
1375937,
1375972,
@ -2759,19 +2783,20 @@ const int catRanges[] = {
2058429,
2058436,
2061908,
2062429,
2062461,
2062948,
2074574,
2074605,
2074653,
2074645,
2075140,
2077213,
2077252,
2079005,
2079221,
2079261,
2080260,
2080659,
2080693,
2080733,
2080773,
2081297,
2081517,
@ -2961,13 +2986,34 @@ const int catRanges[] = {
2139652,
2141341,
2141681,
2141725,
2141696,
2142077,
2142080,
2142589,
2142592,
2142845,
2142848,
2142941,
2142945,
2143325,
2143329,
2143837,
2143841,
2144093,
2144097,
2144189,
2146308,
2156285,
2156548,
2157277,
2157572,
2157853,
2158595,
2158813,
2158819,
2160189,
2160195,
2160509,
2162692,
2162909,
2162948,
@ -3087,6 +3133,10 @@ const int catRanges[] = {
2222634,
2222769,
2222941,
2223620,
2224197,
2224337,
2224477,
2225668,
2226346,
2226589,
@ -3101,7 +3151,11 @@ const int catRanges[] = {
2230749,
2230858,
2231496,
2231837,
2231813,
2231844,
2231909,
2231972,
2232029,
2232293,
2232390,
2232420,
@ -3112,7 +3166,8 @@ const int catRanges[] = {
2234225,
2234298,
2234321,
2234461,
2234437,
2234493,
2234810,
2234845,
2234884,
@ -3288,7 +3343,8 @@ const int catRanges[] = {
2283206,
2283237,
2283268,
2283325,
2283313,
2283357,
2283528,
2283869,
2285572,
@ -3303,7 +3359,8 @@ const int catRanges[] = {
2287434,
2287505,
2287605,
2287645,
2287620,
2287869,
2293764,
2295174,
2295269,
@ -3377,7 +3434,7 @@ const int catRanges[] = {
2315172,
2315217,
2315389,
2316292,
2315780,
2318141,
2326532,
2326845,
@ -3461,6 +3518,9 @@ const int catRanges[] = {
2395837,
2396164,
2402461,
2486788,
2489905,
2489981,
2490372,
2524669,
2524698,
@ -3474,7 +3534,10 @@ const int catRanges[] = {
2968584,
2968925,
2969041,
2969117,
2969092,
2971645,
2971656,
2971997,
2972164,
2973149,
2973189,
@ -3523,8 +3586,14 @@ const int catRanges[] = {
3250909,
3252228,
3252541,
3538435,
3538589,
3538595,
3538845,
3538851,
3538941,
3538948,
3548157,
3548285,
3549700,
3549821,
3550340,
@ -3544,6 +3613,12 @@ const int catRanges[] = {
3642353,
3642394,
3642525,
3792901,
3794397,
3794437,
3795197,
3795477,
3799197,
3801109,
3808989,
3809301,
@ -3560,7 +3635,7 @@ const int catRanges[] = {
3813781,
3814725,
3814869,
3816765,
3816829,
3817493,
3819589,
3819701,
@ -3676,6 +3751,10 @@ const int catRanges[] = {
3888157,
3888165,
3888669,
3923969,
3924292,
3924321,
3924989,
3932165,
3932413,
3932421,
@ -3696,12 +3775,23 @@ const int catRanges[] = {
3942852,
3942901,
3942941,
3953156,
3954117,
3954173,
3954692,
3956101,
3956232,
3956573,
3956723,
3956765,
3996676,
3996925,
3996932,
3997085,
3997092,
3997181,
3997188,
3997693,
3997700,
4004029,
4004074,
@ -3823,7 +3913,7 @@ const int catRanges[] = {
4095860,
4096021,
4119325,
4119573,
4119477,
4119997,
4120085,
4120509,
@ -3833,6 +3923,8 @@ const int catRanges[] = {
4127549,
4127765,
4128157,
4128277,
4128317,
4128789,
4129181,
4129301,
@ -3846,27 +3938,27 @@ const int catRanges[] = {
4134421,
4134493,
4136981,
4140861,
4140885,
4143517,
4143541,
4147869,
4148245,
4148701,
4148757,
4148925,
4149013,
4149117,
4149181,
4149269,
4149501,
4149781,
4150589,
4150717,
4150805,
4151037,
4151165,
4151317,
4151421,
4151517,
4151829,
4152061,
4152157,
4152341,
4152605,
4152853,
4153085,
4153365,
4158077,
4158101,
@ -3874,9 +3966,9 @@ const int catRanges[] = {
4161032,
4161373,
4194308,
5561309,
5561373,
5562372,
5695165,
5695293,
5695492,
5702621,
5702660,

View File

@ -46,6 +46,7 @@
#include <iterator>
#include <functional>
#include <memory>
#include <regex>
#include <iostream>
#include <sstream>
#include <fstream>

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>5.2.0</string>
<string>5.2.1</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>

View File

@ -875,7 +875,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5.2.0;
CURRENT_PROJECT_VERSION = 5.2.1;
DEVELOPMENT_TEAM = 4F446KW87E;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@ -901,7 +901,7 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5.2.0;
CURRENT_PROJECT_VERSION = 5.2.1;
DEVELOPMENT_TEAM = 4F446KW87E;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;

View File

@ -4,8 +4,8 @@
#include <windows.h>
#define VERSION_LEXILLA "5.2.0"
#define VERSION_WORDS 5, 2, 0, 0
#define VERSION_LEXILLA "5.2.1"
#define VERSION_WORDS 5, 2, 1, 0
VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION_WORDS

View File

@ -38,7 +38,7 @@ SUBSYSTEM=-SUBSYSTEM:WINDOWS,10.00
CRTFLAGS=-D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_SECURE_NO_DEPRECATE=1 $(ADD_DEFINE)
CXXFLAGS=-Zi -TP -MP -W4 -EHsc -std:c++17 $(CRTFLAGS)
CXXDEBUG=-Od -MTd -DDEBUG
CXXNDEBUG=-O1 -MT -DNDEBUG -GL
CXXNDEBUG=-O2 -MT -DNDEBUG -GL
NAME=-Fo
LDFLAGS=-OPT:REF -LTCG -IGNORE:4197 -DEBUG $(SUBSYSTEM) $(CETCOMPAT)
LDDEBUG=

View File

@ -1 +1 @@
520
521