Skip to content

Commit

Permalink
Update to scintilla 5.5.0 & Lexilla 5.3.2
Browse files Browse the repository at this point in the history
Sintilla Release 5.5.0 (https://www.scintilla.org/scintilla550.zip)

    Released 23 April 2024.
    Add elements for inactive additional selections SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT and SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK. When not set these default to SC_ELEMENT_SELECTION_INACTIVE_TEXT and SC_ELEMENT_SELECTION_INACTIVE_BACK. Bug #2417.
    On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store.
    Fix Win32 IME crash in windowed mode. Bug #2433.
    Scale reverse arrow cursor for margins to match other cursors when user changes pointer size. Bug #2321.

Lexilla Release 5.3.2 (https://www.scintilla.org/lexilla532.zip)

    Released 23 April 2024.
    COBOL: Stop string literal continuing over line end. Issue #229.
    COBOL: Stop doc comment assigning different styles to \r and \n at line end. Issue #229.
    COBOL: Recognize keywords that start with 'V'. Issue #230.
    COBOL: Recognize comments after tag or that start with '/'. Issue #231.
    HTML: Implement substyles for tags, attributes, and identifiers SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD.
    HTML: Implement context-sensitive attributes. "tag.attribute" matches "attribute" only inside "tag".
    HTML: Match standard handling of comments. Issue #232.
    Lua: Implement substyles for identifiers SCE_LUA_IDENTIFIER.
    Ruby: Allow non-ASCII here-doc delimiters. Issue #234.
    Ruby: Allow modifier if, unless, while and until after heredoc delimiter. Issue #236.
    Rust: Recognize raw identifiers. Issue #239, Pull request #240.

Close #15042
  • Loading branch information
chcg authored and donho committed Apr 30, 2024
1 parent c823ca8 commit 881e8c2
Show file tree
Hide file tree
Showing 119 changed files with 1,916 additions and 765 deletions.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions lexilla/.gitattributes
Expand Up @@ -30,6 +30,7 @@
**.php text
**.vb text
**.asm text
**.cob text
**.cmake text
**.d text
**.diff text
Expand Down
4 changes: 2 additions & 2 deletions lexilla/.github/workflows/build-check-macos.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
cpp_compiler: [clang++]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Scintilla source
run: |
(cd .. && wget --no-verbose https://www.scintilla.org/scintilla500.zip)
Expand All @@ -21,7 +21,7 @@ jobs:
run: (cd test/unit && make DEBUG=1 CXX=${{matrix.cpp_compiler}} test)
- name: Build Lexilla
run: (cd src && make DEBUG=1 CXX=${{matrix.cpp_compiler}})
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: liblexilla.dylib
path: bin/liblexilla.dylib
Expand Down
4 changes: 2 additions & 2 deletions lexilla/.github/workflows/build-check-win32.yml
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Preparing nmake
uses: ilammy/msvc-dev-cmd@v1
with:
Expand All @@ -31,7 +31,7 @@ jobs:
cd src
nmake -f lexilla.mak DEBUG=1
cd ..
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: lexilla.dll
path: bin/lexilla.dll
Expand Down
7 changes: 4 additions & 3 deletions lexilla/.github/workflows/build-check.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
cpp_compiler: [g++, clang++]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Scintilla source
run: |
(cd .. && wget --no-verbose https://www.scintilla.org/scintilla500.zip)
Expand All @@ -21,10 +21,11 @@ jobs:
run: (cd test/unit && make DEBUG=1 CXX=${{matrix.cpp_compiler}} test)
- name: Build Lexilla
run: (cd src && make DEBUG=1 CXX=${{matrix.cpp_compiler}})
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: liblexilla.so
name: liblexilla-${{matrix.cpp_compiler}}.so
path: bin/liblexilla.so
overwrite: true
- name: Test lexing and folding
run: (cd test && make DEBUG=1 CXX=${{matrix.cpp_compiler}} test)
- name: CheckLexilla C Example
Expand Down
4 changes: 0 additions & 4 deletions lexilla/cppcheck.suppress
Expand Up @@ -28,9 +28,6 @@ returnDanglingLifetime:lexilla/access/LexillaAccess.cxx
// cppcheck seems to believe that unique_ptr<char *[]>::get returns void* instead of char**
arithOperationsOnVoidPointer:lexilla/lexlib/WordList.cxx

// This could be fixed but it should be rewritten to use string_view which doesn't have resize
uselessCallsSubstr:lexilla/lexers/LexCPP.cxx

// cppcheck 2.11 limits checking of complex functions unless --check-level=exhaustive but that
// only finds one false issue in LexRuby
checkLevelNormal:lexilla/lexers/LexBash.cxx
Expand Down Expand Up @@ -90,7 +87,6 @@ variableScope:lexilla/lexers/LexGui4Cli.cxx
constParameterReference:lexilla/lexers/LexHaskell.cxx
constParameterReference:lexilla/lexers/LexHex.cxx
knownConditionTrueFalse:lexilla/lexers/LexHex.cxx
constParameterReference:lexilla/lexers/LexHTML.cxx
constVariable:lexilla/lexers/LexHollywood.cxx
variableScope:lexilla/lexers/LexInno.cxx
constVariableReference:lexilla/lexers/LexInno.cxx
Expand Down
8 changes: 4 additions & 4 deletions lexilla/doc/Lexilla.html
Expand Up @@ -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="20240305" />
<meta name="Date.Modified" content="20240423" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
.logo {
Expand Down Expand Up @@ -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.3.1<br />
Site last modified March 5 2024</font>
<font color="#FFCC99" size="3">Release version 5.3.2<br />
Site last modified April 23 2024</font>
</td>
<td width="20%">
&nbsp;
Expand All @@ -77,11 +77,11 @@
</tr>
</table>
<ul id="versionlist">
<li>Version 5.3.2 improves COBOL, HTML, Lua, Ruby, and Rust.</li>
<li>Version 5.3.1 improves Assembler, Bash, Batch, JavaScript, Python, and Ruby.</li>
<li>Version 5.3.0 improves Bash, HTML, and Lua.</li>
<li>Version 5.2.9 fixes potential problems on macOS 12 and older when built with Xcode 15.0.</li>
<li>Version 5.2.8 improves Python and R.</li>
<li>Version 5.2.7 improves Bash, F#, and HTML.</li>
</ul>
<ul id="menu">
<li id="remote1"><a href="https://www.scintilla.org/SciTEImage.html">Screenshot</a></li>
Expand Down
10 changes: 5 additions & 5 deletions lexilla/doc/LexillaDownload.html
Expand Up @@ -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/lexilla531.zip">
<font size="4"> <a href="https://www.scintilla.org/lexilla532.zip">
Windows</a>&nbsp;&nbsp;
<a href="https://www.scintilla.org/lexilla531.tgz">
<a href="https://www.scintilla.org/lexilla532.tgz">
GTK/Linux</a>&nbsp;&nbsp;
</font>
</td>
Expand All @@ -42,16 +42,16 @@ <h2>
containing very few restrictions.
</p>
<h3>
Release 5.3.1
Release 5.3.2
</h3>
<h4>
Source Code
</h4>
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/lexilla531.zip">zip format</a> (1.3M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/lexilla531.tgz">tgz format</a> (0.9M) commonly used on Linux and compatible operating systems</li>
<li><a href="https://www.scintilla.org/lexilla532.zip">zip format</a> (1.3M) commonly used on Windows</li>
<li><a href="https://www.scintilla.org/lexilla532.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>
Expand Down
53 changes: 52 additions & 1 deletion lexilla/doc/LexillaHistory.html
Expand Up @@ -588,6 +588,57 @@ <h2>Contributors</h2>
</tr>
</table>
<h2>Releases</h2>
<h3>
<a href="https://www.scintilla.org/lexilla532.zip">Release 5.3.2</a>
</h3>
<ul>
<li>
Released 23 April 2024.
</li>
<li>
COBOL: Stop string literal continuing over line end.
<a href="https://github.com/ScintillaOrg/lexilla/issues/229">Issue #229</a>.
</li>
<li>
COBOL: Stop doc comment assigning different styles to \r and \n at line end.
<a href="https://github.com/ScintillaOrg/lexilla/issues/229">Issue #229</a>.
</li>
<li>
COBOL: Recognize keywords that start with 'V'.
<a href="https://github.com/ScintillaOrg/lexilla/issues/230">Issue #230</a>.
</li>
<li>
COBOL: Recognize comments after tag or that start with '/'.
<a href="https://github.com/ScintillaOrg/lexilla/issues/231">Issue #231</a>.
</li>
<li>
HTML: Implement substyles for tags, attributes, and identifiers
SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD.
</li>
<li>
HTML: Implement context-sensitive attributes. "tag.attribute" matches "attribute" only inside "tag".
</li>
<li>
HTML: Match standard handling of comments.
<a href="https://github.com/ScintillaOrg/lexilla/issues/232">Issue #232</a>.
</li>
<li>
Lua: Implement substyles for identifiers SCE_LUA_IDENTIFIER.
</li>
<li>
Ruby: Allow non-ASCII here-doc delimiters.
<a href="https://github.com/ScintillaOrg/lexilla/issues/234">Issue #234</a>.
</li>
<li>
Ruby: Allow modifier if, unless, while and until after heredoc delimiter.
<a href="https://github.com/ScintillaOrg/lexilla/issues/236">Issue #236</a>.
</li>
<li>
Rust: Recognize raw identifiers.
<a href="https://github.com/ScintillaOrg/lexilla/issues/239">Issue #239</a>,
<a href="https://github.com/ScintillaOrg/lexilla/pull/240">Pull request #240</a>.
</li>
</ul>
<h3>
<a href="https://www.scintilla.org/lexilla531.zip">Release 5.3.1</a>
</h3>
Expand Down Expand Up @@ -12774,7 +12825,7 @@ <h3>
Pascal lexer handles comments more correctly.
</li>
<li>
C/C++/Java/JavaScipt lexer has a state for line doc comments.
C/C++/Java/JavaScript lexer has a state for line doc comments.
</li>
<li>
Error output lexer understands Sun CC messages.
Expand Down
5 changes: 1 addition & 4 deletions lexilla/lexers/LexAsm.cxx
Expand Up @@ -240,10 +240,7 @@ Sci_Position SCI_METHOD LexerAsm::WordListSet(int n, const char *wl) {
}
Sci_Position firstModification = -1;
if (wordListN) {
WordList wlNew;
wlNew.Set(wl);
if (*wordListN != wlNew) {
wordListN->Set(wl);
if (wordListN->Set(wl)) {
firstModification = 0;
}
}
Expand Down
5 changes: 2 additions & 3 deletions lexilla/lexers/LexBash.cxx
Expand Up @@ -483,12 +483,11 @@ class LexerBash final : public DefaultLexer {
OptionSetBash osBash;
CharacterSet setParamStart;
enum { ssIdentifier, ssScalar };
SubStyles subStyles;
SubStyles subStyles{styleSubable};
public:
LexerBash() :
DefaultLexer("bash", SCLEX_BASH, lexicalClasses, std::size(lexicalClasses)),
setParamStart(CharacterSet::setAlphaNum, "_" BASH_SPECIAL_PARAMETER),
subStyles(styleSubable, 0x80, 0x40, 0) {
setParamStart(CharacterSet::setAlphaNum, "_" BASH_SPECIAL_PARAMETER) {
cmdDelimiter.Set("| || |& & && ; ;; ( ) { }");
bashStruct.Set("if elif fi while until else then do done esac eval");
bashStruct_in.Set("for case select");
Expand Down
32 changes: 13 additions & 19 deletions lexilla/lexers/LexBatch.cxx
Expand Up @@ -59,7 +59,7 @@ constexpr bool IsBSeparator(char ch) noexcept {
}

// Tests for escape character
bool IsEscaped(const char* wordStr, Sci_PositionU pos) noexcept {
constexpr bool IsEscaped(const char* wordStr, Sci_PositionU pos) noexcept {
bool isQoted=false;
while (pos>0){
pos--;
Expand All @@ -71,30 +71,24 @@ bool IsEscaped(const char* wordStr, Sci_PositionU pos) noexcept {
return isQoted;
}

// Tests for quote character
bool textQuoted(const char *lineBuffer, Sci_PositionU endPos) {
char strBuffer[1024];
strncpy(strBuffer, lineBuffer, endPos);
strBuffer[endPos] = '\0';
constexpr bool IsQuotedBy(std::string_view svBuffer, char quote) noexcept {
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)
{
if (!IsEscaped(strBuffer, pQuote - strBuffer)) {
CurrentStatus = !CurrentStatus;
}
pQuote = strchr(pQuote + 1, strQuotes[i]);
}
if (CurrentStatus) {
break;
size_t pQuote = svBuffer.find(quote);
while (pQuote != std::string_view::npos) {
if (!IsEscaped(svBuffer.data(), pQuote)) {
CurrentStatus = !CurrentStatus;
}
pQuote = svBuffer.find(quote, pQuote + 1);
}
return CurrentStatus;
}

// Tests for quote character
constexpr bool textQuoted(const char *lineBuffer, Sci_PositionU endPos) noexcept {
const std::string_view svBuffer(lineBuffer, endPos);
return IsQuotedBy(svBuffer, '\"') || IsQuotedBy(svBuffer, '\'');
}

void ColouriseBatchDoc(
Sci_PositionU startPos,
Sci_Position length,
Expand Down

0 comments on commit 881e8c2

Please sign in to comment.