Skip to content

Commit 2347611

Browse files
committed
Upgrade Lexilla to v5.4.5
1 parent 47ed42d commit 2347611

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+598
-293
lines changed

src/lexilla/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ directory conventionally called "lexilla".
2727
To use GCC, run lexilla/src/makefile:
2828
make
2929

30-
To use Clang, run lexilla/test/makefile:
30+
To use Clang, run lexilla/src/makefile:
3131
make CLANG=1
3232
On macOS, CLANG is set automatically so this can just be
3333
make
3434

35-
To use MSVC, run lexilla/test/lexilla.mak:
35+
To use MSVC, run lexilla/src/lexilla.mak:
3636
nmake -f lexilla.mak
3737

3838
To build a debugging version of the library, add DEBUG=1 to the command:

src/lexilla/access/LexillaAccess.cxx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
namespace {
3131

3232
#if defined(_WIN32)
33-
typedef FARPROC Function;
34-
typedef HMODULE Module;
33+
using Function = FARPROC;
34+
using Module = HMODULE;
3535
constexpr const char *pathSeparator = "\\";
3636
#else
37-
typedef void *Function;
38-
typedef void *Module;
37+
using Function = void *;
38+
using Module = void *;
3939
constexpr const char *pathSeparator = "/";
4040
#endif
4141

@@ -164,9 +164,10 @@ bool Lexilla::Load(std::string_view sharedLibraryPaths) {
164164
if (fnLexerCount && fnLexerName) {
165165
const int nLexers = fnLexerCount();
166166
for (int i = 0; i < nLexers; i++) {
167-
char name[100] = "";
167+
constexpr size_t lengthName = 200;
168+
char name[lengthName]{};
168169
fnLexerName(i, name, sizeof(name));
169-
lexers.push_back(name);
170+
lexers.emplace_back(name);
170171
}
171172
}
172173
CreateLexerFn fnCL = FunctionPointer<CreateLexerFn>(
@@ -268,7 +269,7 @@ std::string Lexilla::NameFromID(int identifier) {
268269
}
269270
}
270271
}
271-
return std::string();
272+
return {};
272273
}
273274

274275
std::vector<std::string> Lexilla::LibraryProperties() {

src/lexilla/cppcheck.suppress

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,14 @@ variableScope:lexilla/lexers/LexCmake.cxx
7070
knownConditionTrueFalse:lexilla/lexers/LexCmake.cxx
7171
constParameterReference:lexilla/lexers/LexCmake.cxx
7272
constParameterReference:lexilla/lexers/LexCOBOL.cxx
73+
constVariablePointer:lexilla/lexers/LexCOBOL.cxx
7374
constParameterReference:lexilla/lexers/LexCoffeeScript.cxx
7475
constParameterPointer:lexilla/lexers/LexCoffeeScript.cxx
7576
knownConditionTrueFalse:lexilla/lexers/LexCoffeeScript.cxx
7677
constVariableReference:lexilla/lexers/LexConf.cxx
7778
constParameterReference:lexilla/lexers/LexCPP.cxx
7879
variableScope:lexilla/lexers/LexCSS.cxx
80+
constVariablePointer:lexilla/lexers/LexCSS.cxx
7981
knownConditionTrueFalse:lexilla/lexers/LexDataflex.cxx
8082
constParameterReference:lexilla/lexers/LexDataflex.cxx
8183
variableScope:lexilla/lexers/LexDataflex.cxx
@@ -118,6 +120,7 @@ unreadVariable:lexilla/lexers/LexMatlab.cxx
118120
variableScope:lexilla/lexers/LexMatlab.cxx
119121
variableScope:lexilla/lexers/LexMetapost.cxx
120122
constParameterReference:lexilla/lexers/LexModula.cxx
123+
duplicateBreak:lexilla/lexers/LexModula.cxx
121124
variableScope:lexilla/lexers/LexModula.cxx
122125
constParameterReference:lexilla/lexers/LexMPT.cxx
123126
variableScope:lexilla/lexers/LexMSSQL.cxx
@@ -140,6 +143,7 @@ constVariableReference:lexilla/lexers/LexPerl.cxx
140143
knownConditionTrueFalse:lexilla/lexers/LexPerl.cxx
141144
constParameterReference:lexilla/lexers/LexPLM.cxx
142145
constParameterReference:lexilla/lexers/LexPO.cxx
146+
constVariablePointer:lexilla/lexers/LexPOV.cxx
143147
constParameterReference:lexilla/lexers/LexPython.cxx
144148
shadowVariable:lexilla/lexers/LexPowerPro.cxx
145149
knownConditionTrueFalse:lexilla/lexers/LexPowerPro.cxx
@@ -167,7 +171,6 @@ constParameterPointer:lexilla/lexers/LexTCMD.cxx
167171
invalidscanf:lexilla/lexers/LexTCMD.cxx
168172
constParameterReference:lexilla/lexers/LexTeX.cxx
169173
variableScope:lexilla/lexers/LexTeX.cxx
170-
constVariableReference:lexilla/lexers/LexTroff.cxx
171174
knownConditionTrueFalse:lexilla/lexers/LexVB.cxx
172175
constParameterReference:lexilla/lexers/LexVerilog.cxx
173176
variableScope:lexilla/lexers/LexVerilog.cxx
@@ -188,7 +191,6 @@ constVariableReference:lexilla/lexers/LexX12.cxx
188191
constParameterPointer:lexilla/lexers/LexX12.cxx
189192
uselessCallsSubstr:lexilla/lexers/LexX12.cxx
190193
constParameterReference:lexilla/lexers/LexYAML.cxx
191-
constParameterPointer:lexilla/lexers/LexYAML.cxx
192194
knownConditionTrueFalse:lexilla/lexers/LexYAML.cxx
193195

194196
// These are due to Accessor::IndentAmount not declaring the callback as taking a const.

src/lexilla/doc/Lexilla.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
1010
<meta name="Description"
1111
content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
12-
<meta name="Date.Modified" content="20250225" />
12+
<meta name="Date.Modified" content="20250608" />
1313
<meta name="viewport" content="width=device-width, initial-scale=1" />
1414
<style type="text/css">
1515
.logo {
@@ -51,6 +51,7 @@
5151
<title>
5252
Lexilla
5353
</title>
54+
<link rel="canonical" href="https://scintilla.org/Lexilla.html" />
5455
</head>
5556
<body bgcolor="#FFFFFF" text="#000000">
5657
<table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="0" border="0">
@@ -61,8 +62,8 @@
6162
<font color="#FFCC99" size="4"> A library of language lexers for use with Scintilla</font>
6263
</td>
6364
<td width="40%" align="right">
64-
<font color="#FFCC99" size="3">Release version 5.4.3<br />
65-
Site last modified February 25 2025</font>
65+
<font color="#FFCC99" size="3">Release version 5.4.5<br />
66+
Site last modified June 8 2025</font>
6667
</td>
6768
<td width="20%">
6869
&nbsp;
@@ -77,11 +78,11 @@
7778
</tr>
7879
</table>
7980
<ul id="versionlist">
81+
<li>Version 5.4.5 improves Dart, Makefile, Nix, TOML, and Zig.</li>
82+
<li>Version 5.4.4 fixes a problem when building for ARM64 on Windows.</li>
8083
<li>Version 5.4.3 improves C++, Modula 3, Pascal, Python, and Ruby.</li>
8184
<li>Version 5.4.2 adds Nix lexer. Improves JavaScript, PHP, Rust, TOML, and Zig.</li>
8285
<li>Version 5.4.1 adds Dart, troff, and Zig lexers. Improves C++, F#, HTML, and Smalltalk.</li>
83-
<li>Version 5.4.0 adds a TOML lexer.</li>
84-
<li>Version 5.3.3 improves HTML, JavaScript, Lua, PHP, and XML.</li>
8586
</ul>
8687
<ul id="menu">
8788
<li id="remote1"><a href="https://www.scintilla.org/SciTEImage.html">Screenshot</a></li>

src/lexilla/doc/LexillaDoc.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
1111

1212
<title>Lexilla Documentation</title>
13+
<link rel="canonical" href="https://scintilla.org/LexillaDoc.html" />
1314

1415
<style type="text/css">
1516
<!--

src/lexilla/doc/LexillaDownload.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
2727
<tr>
2828
<td>
29-
<font size="4"> <a href="https://www.scintilla.org/lexilla543.zip">
29+
<font size="4"> <a href="https://www.scintilla.org/lexilla545.zip">
3030
Windows</a>&nbsp;&nbsp;
31-
<a href="https://www.scintilla.org/lexilla543.tgz">
31+
<a href="https://www.scintilla.org/lexilla545.tgz">
3232
GTK/Linux</a>&nbsp;&nbsp;
3333
</font>
3434
</td>
@@ -42,16 +42,16 @@ <h2>
4242
containing very few restrictions.
4343
</p>
4444
<h3>
45-
Release 5.4.3
45+
Release 5.4.5
4646
</h3>
4747
<h4>
4848
Source Code
4949
</h4>
5050
The source code package contains all of the source code for Lexilla but no binary
5151
executable code and is available in
5252
<ul>
53-
<li><a href="https://www.scintilla.org/lexilla543.zip">zip format</a> (1.4M) commonly used on Windows</li>
54-
<li><a href="https://www.scintilla.org/lexilla543.tgz">tgz format</a> (1.0M) commonly used on Linux and compatible operating systems</li>
53+
<li><a href="https://www.scintilla.org/lexilla545.zip">zip format</a> (1.4M) commonly used on Windows</li>
54+
<li><a href="https://www.scintilla.org/lexilla545.tgz">tgz format</a> (1.0M) commonly used on Linux and compatible operating systems</li>
5555
</ul>
5656
Instructions for building on both Windows and Linux are included in the readme file.
5757
<h4>

src/lexilla/doc/LexillaHistory.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,50 @@ <h2>Contributors</h2>
590590
<td>Henrik S. Johansen</td>
591591
<td>Ekopalypse</td>
592592
<td>HoTschir</td>
593+
<td>Ahmet Sait</td>
593594
</tr>
594595
</table>
595596
<h2 id="Releases">Releases</h2>
597+
<h3>
598+
<a href="https://www.scintilla.org/lexilla545.zip">Release 5.4.5</a>
599+
</h3>
600+
<ul>
601+
<li>
602+
Released 8 June 2025.
603+
</li>
604+
<li>
605+
Dart: Add error state SCE_DART_STRINGEOL for unterminated string.
606+
<a href="https://github.com/ScintillaOrg/lexilla/pull/315">Pull request #315</a>.
607+
</li>
608+
<li>
609+
Makefile: Add a keyword list to makefile lexer to highlight GNU Make directives like 'ifdef' and 'vpath' as
610+
SCE_MAKE_PREPROCESSOR since these are similar to NMAKE directives like '!IFDEF'.
611+
</li>
612+
<li>
613+
Nix: Add error state SCE_NIX_STRINGEOL for unterminated string.
614+
<a href="https://github.com/ScintillaOrg/lexilla/pull/315">Pull request #315</a>.
615+
</li>
616+
<li>
617+
TOML: Add error state SCE_TOML_STRINGEOL for unterminated string.
618+
<a href="https://github.com/ScintillaOrg/lexilla/pull/315">Pull request #315</a>.
619+
</li>
620+
<li>
621+
Zig: Add error state SCE_ZIG_STRINGEOL for unterminated string.
622+
<a href="https://github.com/ScintillaOrg/lexilla/pull/315">Pull request #315</a>.
623+
</li>
624+
</ul>
625+
<h3>
626+
<a href="https://www.scintilla.org/lexilla544.zip">Release 5.4.4</a>
627+
</h3>
628+
<ul>
629+
<li>
630+
Released 2 April 2025.
631+
</li>
632+
<li>
633+
Fix building for ARM64.
634+
<a href="https://github.com/ScintillaOrg/lexilla/pull/308">Pull request #308</a>.
635+
</li>
636+
</ul>
596637
<h3>
597638
<a href="https://www.scintilla.org/lexilla543.zip">Release 5.4.3</a>
598639
</h3>

src/lexilla/include/LexicalStyles.iface

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,6 +2349,7 @@ val SCE_TOML_TRIPLE_STRING_SQ=11
23492349
val SCE_TOML_TRIPLE_STRING_DQ=12
23502350
val SCE_TOML_ESCAPECHAR=13
23512351
val SCE_TOML_DATETIME=14
2352+
val SCE_TOML_STRINGEOL=15
23522353
# Lexical states for SCLEX_TROFF
23532354
lex troff=SCLEX_TROFF SCE_TROFF_
23542355
val SCE_TROFF_DEFAULT=0
@@ -2408,6 +2409,7 @@ val SCE_DART_KW_PRIMARY=23
24082409
val SCE_DART_KW_SECONDARY=24
24092410
val SCE_DART_KW_TERTIARY=25
24102411
val SCE_DART_KW_TYPE=26
2412+
val SCE_DART_STRINGEOL=27
24112413
# Lexical states for SCLEX_ZIG
24122414
lex Zig=SCLEX_ZIG SCE_ZIG_
24132415
val SCE_ZIG_DEFAULT=0
@@ -2428,6 +2430,7 @@ val SCE_ZIG_KW_SECONDARY=14
24282430
val SCE_ZIG_KW_TERTIARY=15
24292431
val SCE_ZIG_KW_TYPE=16
24302432
val SCE_ZIG_IDENTIFIER_STRING=17
2433+
val SCE_ZIG_STRINGEOL=18
24312434
# Lexical states for SCLEX_NIX
24322435
lex Nix=SCLEX_NIX SCE_NIX_
24332436
val SCE_NIX_DEFAULT=0
@@ -2446,3 +2449,4 @@ val SCE_NIX_KEYWORD1=12
24462449
val SCE_NIX_KEYWORD2=13
24472450
val SCE_NIX_KEYWORD3=14
24482451
val SCE_NIX_KEYWORD4=15
2452+
val SCE_NIX_STRINGEOL=16

src/lexilla/include/SciLexer.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,6 +2095,7 @@
20952095
#define SCE_TOML_TRIPLE_STRING_DQ 12
20962096
#define SCE_TOML_ESCAPECHAR 13
20972097
#define SCE_TOML_DATETIME 14
2098+
#define SCE_TOML_STRINGEOL 15
20982099
#define SCE_TROFF_DEFAULT 0
20992100
#define SCE_TROFF_REQUEST 1
21002101
#define SCE_TROFF_COMMAND 2
@@ -2150,6 +2151,7 @@
21502151
#define SCE_DART_KW_SECONDARY 24
21512152
#define SCE_DART_KW_TERTIARY 25
21522153
#define SCE_DART_KW_TYPE 26
2154+
#define SCE_DART_STRINGEOL 27
21532155
#define SCE_ZIG_DEFAULT 0
21542156
#define SCE_ZIG_COMMENTLINE 1
21552157
#define SCE_ZIG_COMMENTLINEDOC 2
@@ -2168,6 +2170,7 @@
21682170
#define SCE_ZIG_KW_TERTIARY 15
21692171
#define SCE_ZIG_KW_TYPE 16
21702172
#define SCE_ZIG_IDENTIFIER_STRING 17
2173+
#define SCE_ZIG_STRINGEOL 18
21712174
#define SCE_NIX_DEFAULT 0
21722175
#define SCE_NIX_COMMENTLINE 1
21732176
#define SCE_NIX_COMMENTBLOCK 2
@@ -2184,6 +2187,7 @@
21842187
#define SCE_NIX_KEYWORD2 13
21852188
#define SCE_NIX_KEYWORD3 14
21862189
#define SCE_NIX_KEYWORD4 15
2190+
#define SCE_NIX_STRINGEOL 16
21872191
/* --Autogenerated -- end of section automatically generated from Scintilla.iface */
21882192

21892193
#endif

0 commit comments

Comments
 (0)