Notepad++ official repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

291 lines
8.5 KiB

#!/usr/bin/env python3
# ScintillaAPIFacer.py - regenerate the ScintillaTypes.h, and ScintillaMessages.h
# from the Scintilla.iface interface definition file.
# Implemented 2019 by Neil Hodgson neilh@scintilla.org
# Requires Python 3.6 or later
import pathlib
import Face
import FileGenerator
import HFacer
namespace = "Scintilla::"
typeAliases = {
# Convert iface types to C++ types
# bool and void are OK as is
"cells": "const char *",
"colour": "Colour",
"colouralpha": "ColourAlpha",
"findtext": "void *",
Update scintilla 5.3.4 and lexilla 5.2.4 with: https://www.scintilla.org/scintilla534.zip Released 8 March 2023. Add multithreaded wrap to significantly improve performance of wrapping large files. More typesafe bindings of *Full APIs in ScintillaCall. Feature #1477. Fix overlapping of text with line end wrap marker. Bug #2378. Fix clipping of line end wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT. Where a multi-byte character contains multiple styles, display each byte as a representation. This makes it easier to see and fix lexers that change styles mid-character, commonly because they use fixed size buffers. Fix a potential crash with autocompletion list fill-ups where a SCN_CHARADDED handler retriggered an autocompletion list, but with no items that match the typed character. lexilla523 Released 8 March 2023. Add scripts/PromoteNew.bat script to promote .new files after checking. Makefile: Remove 1024-byte line length limit.. Ruby: Add new lexical classes for % literals SCE_RB_STRING_W (%w non-interpolable string array), SCE_RB_STRING_I (%i non-interpolable symbol array), SCE_RB_STRING_QI (%I interpolable symbol array), and SCE_RB_STRING_QS (%s symbol). Issue #124. Ruby: Disambiguate %= which may be a quote or modulo assignment. Issue #124, Bug #1255, Bug #2182. Ruby: Fix additional fold level for single character in SCE_RB_STRING_QW. Issue #132. Ruby: Set SCE_RB_HERE_QQ for unquoted and double-quoted heredocs and SCE_RB_HERE_QX for backticks-quoted heredocs. Issue #134. Ruby: Recognise #{} inside SCE_RB_HERE_QQ and SCE_RB_HERE_QX. Issue #134. Ruby: Improve regex and heredoc recognition. Issue #136. Ruby: Highlight #@, #@@ and #$ style interpolation. Issue #140. Ruby: Fix folding for multiple heredocs started on one line. Fix folding when there is a space after heredoc opening delimiter. Issue #135. YAML: Remove 1024-byte line length limit. https://www.scintilla.org/lexilla524.zip Released 13 March 2023. C++: Fix failure to recognize keywords containing upper case. Issue #149. GDScript: Support % and $ node paths. Issue #145, Pull request #146. Close #13338
2 years ago
"findtextfull": "TextToFindFull *",
"formatrange": "void *",
Update scintilla 5.3.4 and lexilla 5.2.4 with: https://www.scintilla.org/scintilla534.zip Released 8 March 2023. Add multithreaded wrap to significantly improve performance of wrapping large files. More typesafe bindings of *Full APIs in ScintillaCall. Feature #1477. Fix overlapping of text with line end wrap marker. Bug #2378. Fix clipping of line end wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT. Where a multi-byte character contains multiple styles, display each byte as a representation. This makes it easier to see and fix lexers that change styles mid-character, commonly because they use fixed size buffers. Fix a potential crash with autocompletion list fill-ups where a SCN_CHARADDED handler retriggered an autocompletion list, but with no items that match the typed character. lexilla523 Released 8 March 2023. Add scripts/PromoteNew.bat script to promote .new files after checking. Makefile: Remove 1024-byte line length limit.. Ruby: Add new lexical classes for % literals SCE_RB_STRING_W (%w non-interpolable string array), SCE_RB_STRING_I (%i non-interpolable symbol array), SCE_RB_STRING_QI (%I interpolable symbol array), and SCE_RB_STRING_QS (%s symbol). Issue #124. Ruby: Disambiguate %= which may be a quote or modulo assignment. Issue #124, Bug #1255, Bug #2182. Ruby: Fix additional fold level for single character in SCE_RB_STRING_QW. Issue #132. Ruby: Set SCE_RB_HERE_QQ for unquoted and double-quoted heredocs and SCE_RB_HERE_QX for backticks-quoted heredocs. Issue #134. Ruby: Recognise #{} inside SCE_RB_HERE_QQ and SCE_RB_HERE_QX. Issue #134. Ruby: Improve regex and heredoc recognition. Issue #136. Ruby: Highlight #@, #@@ and #$ style interpolation. Issue #140. Ruby: Fix folding for multiple heredocs started on one line. Fix folding when there is a space after heredoc opening delimiter. Issue #135. YAML: Remove 1024-byte line length limit. https://www.scintilla.org/lexilla524.zip Released 13 March 2023. C++: Fix failure to recognize keywords containing upper case. Issue #149. GDScript: Support % and $ node paths. Issue #145, Pull request #146. Close #13338
2 years ago
"formatrangefull": "RangeToFormatFull *",
"int": "int",
"keymod": "int",
"line": "Line",
"pointer": "void *",
"position": "Position",
"string": "const char *",
"stringresult": "char *",
"textrange": "void *",
Update scintilla 5.3.4 and lexilla 5.2.4 with: https://www.scintilla.org/scintilla534.zip Released 8 March 2023. Add multithreaded wrap to significantly improve performance of wrapping large files. More typesafe bindings of *Full APIs in ScintillaCall. Feature #1477. Fix overlapping of text with line end wrap marker. Bug #2378. Fix clipping of line end wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT. Where a multi-byte character contains multiple styles, display each byte as a representation. This makes it easier to see and fix lexers that change styles mid-character, commonly because they use fixed size buffers. Fix a potential crash with autocompletion list fill-ups where a SCN_CHARADDED handler retriggered an autocompletion list, but with no items that match the typed character. lexilla523 Released 8 March 2023. Add scripts/PromoteNew.bat script to promote .new files after checking. Makefile: Remove 1024-byte line length limit.. Ruby: Add new lexical classes for % literals SCE_RB_STRING_W (%w non-interpolable string array), SCE_RB_STRING_I (%i non-interpolable symbol array), SCE_RB_STRING_QI (%I interpolable symbol array), and SCE_RB_STRING_QS (%s symbol). Issue #124. Ruby: Disambiguate %= which may be a quote or modulo assignment. Issue #124, Bug #1255, Bug #2182. Ruby: Fix additional fold level for single character in SCE_RB_STRING_QW. Issue #132. Ruby: Set SCE_RB_HERE_QQ for unquoted and double-quoted heredocs and SCE_RB_HERE_QX for backticks-quoted heredocs. Issue #134. Ruby: Recognise #{} inside SCE_RB_HERE_QQ and SCE_RB_HERE_QX. Issue #134. Ruby: Improve regex and heredoc recognition. Issue #136. Ruby: Highlight #@, #@@ and #$ style interpolation. Issue #140. Ruby: Fix folding for multiple heredocs started on one line. Fix folding when there is a space after heredoc opening delimiter. Issue #135. YAML: Remove 1024-byte line length limit. https://www.scintilla.org/lexilla524.zip Released 13 March 2023. C++: Fix failure to recognize keywords containing upper case. Issue #149. GDScript: Support % and $ node paths. Issue #145, Pull request #146. Close #13338
2 years ago
"textrangefull": "TextRangeFull *",
}
basicTypes = [
"bool",
"char *",
"Colour",
"ColourAlpha",
"const char *",
"int",
"intptr_t",
"Line",
"Position",
"void",
"void *",
]
deadValues = [
"INDIC_CONTAINER",
"INDIC_IME",
"INDIC_IME_MAX",
"INDIC_MAX",
]
def ActualTypeName(type, identifier=None):
Updated to Scintilla 5.4.1 & Lexilla 5.3.0 Scintilla 5.4.1 https://www.scintilla.org/scintilla541.zip Released 27 December 2023. 1. Add IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in a Scintilla instance. This feature is provisonal and may change before being declared stable. For better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require changes to client code that uses document pointer APIs DocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument. 2. Ctrl-click on a selection deselects it in multiple selection mode. 3. Add SCI_SELECTIONFROMPOINT for modifying multiple selections. 4. Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to simplify selection mode manipulation. 5. Improve performance of global replace by reducing cache invalidation overhead. [Feature #1502](https://sourceforge.net/p/scintilla/feature-requests/1502/). 6. Fix regular expression search for "\<" matching beginning of search when not beginning of word and for "\>" not matching line end. [Bug #2157](https://sourceforge.net/p/scintilla/bugs/2157/). 7. Fix regular expression search failure when search for "\<" followed by search for "\>". [Bug #2413](https://sourceforge.net/p/scintilla/bugs/2413/). 8. Fix regular expression assertion (^, $, \b. \B) failures when using SCFIND_CXX11REGEX. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 9. Fix regular expression bug in reverse direction where shortened match returned. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 10. Avoid character fragments in regular expression search results. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 11. With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE. 12. Protect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from application changing target in notification handlers. [Bug #2289](https://sourceforge.net/p/scintilla/bugs/2289/). Lexilla 5.3.0 https://www.scintilla.org/lexilla530.zip Released 27 December 2023. 1. Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header. [Bug #2421](https://sourceforge.net/p/scintilla/bugs/2421/). 2. Bash: Fix shift operator << incorrectly recognized as here-doc. [Issue #215](https://github.com/ScintillaOrg/lexilla/issues/215). 3. Bash: Fix termination of '${' with first unquoted '}' instead of nesting. [Issue #216](https://github.com/ScintillaOrg/lexilla/issues/216). 4. HTML: JavaScript double-quoted strings may escape line end with '\'. [Issue #214](https://github.com/ScintillaOrg/lexilla/issues/214). 5. Lua: recognize --- doc comments. Defined by [LDoc](https://github.com/lunarmodules/ldoc). Does not recognize --[[-- doc comments which seem less common. Close #14375
1 year ago
if type == "pointer" and identifier in ["doc", "DocPointer", "CreateDocument"]:
return "IDocumentEditable *"
elif type in typeAliases:
return typeAliases[type]
else:
return type
def IsEnumeration(s):
if s in ["Position", "Line", "Colour", "ColourAlpha"]:
return False
Updated to Scintilla 5.4.1 & Lexilla 5.3.0 Scintilla 5.4.1 https://www.scintilla.org/scintilla541.zip Released 27 December 2023. 1. Add IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in a Scintilla instance. This feature is provisonal and may change before being declared stable. For better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require changes to client code that uses document pointer APIs DocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument. 2. Ctrl-click on a selection deselects it in multiple selection mode. 3. Add SCI_SELECTIONFROMPOINT for modifying multiple selections. 4. Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to simplify selection mode manipulation. 5. Improve performance of global replace by reducing cache invalidation overhead. [Feature #1502](https://sourceforge.net/p/scintilla/feature-requests/1502/). 6. Fix regular expression search for "\<" matching beginning of search when not beginning of word and for "\>" not matching line end. [Bug #2157](https://sourceforge.net/p/scintilla/bugs/2157/). 7. Fix regular expression search failure when search for "\<" followed by search for "\>". [Bug #2413](https://sourceforge.net/p/scintilla/bugs/2413/). 8. Fix regular expression assertion (^, $, \b. \B) failures when using SCFIND_CXX11REGEX. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 9. Fix regular expression bug in reverse direction where shortened match returned. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 10. Avoid character fragments in regular expression search results. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 11. With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE. 12. Protect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from application changing target in notification handlers. [Bug #2289](https://sourceforge.net/p/scintilla/bugs/2289/). Lexilla 5.3.0 https://www.scintilla.org/lexilla530.zip Released 27 December 2023. 1. Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header. [Bug #2421](https://sourceforge.net/p/scintilla/bugs/2421/). 2. Bash: Fix shift operator << incorrectly recognized as here-doc. [Issue #215](https://github.com/ScintillaOrg/lexilla/issues/215). 3. Bash: Fix termination of '${' with first unquoted '}' instead of nesting. [Issue #216](https://github.com/ScintillaOrg/lexilla/issues/216). 4. HTML: JavaScript double-quoted strings may escape line end with '\'. [Issue #214](https://github.com/ScintillaOrg/lexilla/issues/214). 5. Lua: recognize --- doc comments. Defined by [LDoc](https://github.com/lunarmodules/ldoc). Does not recognize --[[-- doc comments which seem less common. Close #14375
1 year ago
if s.endswith("*"):
return False
return s[:1].isupper()
def JoinTypeAndIdentifier(type, identifier):
# Add a space to separate type from identifier unless type is pointer
if type.endswith("*"):
return type + identifier
else:
return type + " " + identifier
def ParametersArgsCallname(v):
parameters = ""
args = ""
callName = "Call"
param1TypeBase = v["Param1Type"]
param1Name = v["Param1Name"]
param1Type = ActualTypeName(param1TypeBase, param1Name)
param1Arg = ""
if param1Type:
castName = param1Name
if param1Type.endswith("*"):
castName = "reinterpret_cast<uintptr_t>(" + param1Name + ")"
elif param1Type not in basicTypes:
castName = "static_cast<uintptr_t>(" + param1Name + ")"
if IsEnumeration(param1TypeBase):
param1Type = namespace + param1Type
param1Arg = JoinTypeAndIdentifier(param1Type, param1Name)
parameters = param1Arg
args = castName
param2TypeBase = v["Param2Type"]
param2Name = v["Param2Name"]
param2Type = ActualTypeName(param2TypeBase, param2Name)
param2Arg = ""
if param2Type:
castName = param2Name
if param2Type.endswith("*"):
if param2Type == "const char *":
callName = "CallString"
else:
callName = "CallPointer"
elif param2Type not in basicTypes:
castName = "static_cast<intptr_t>(" + param2Name + ")"
if IsEnumeration(param2TypeBase):
param2Type = namespace + param2Type
param2Arg = JoinTypeAndIdentifier(param2Type, param2Name)
if param1Arg:
parameters = parameters + ", "
parameters = parameters + param2Arg
if not args:
args = args + "0"
if args:
args = args + ", "
args = args + castName
if args:
args = ", " + args
return (parameters, args, callName)
def ParametersExceptLast(parameters):
if "," in parameters:
return parameters[:parameters.rfind(",")]
else:
return ""
def HMessages(f):
out = ["enum class Message {"]
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
out.append("\t" + name + " = " + v["Value"] + ",")
out.append("};")
return out
def HEnumerations(f):
out = []
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
# Only want non-deprecated enumerations and lexers are not part of Scintilla API
if v["FeatureType"] in ["enu"] and name != "Lexer":
out.append("")
prefixes = v["Value"].split()
#out.append("enum class " + name + " {" + " // " + ",".join(prefixes))
out.append("enum class " + name + " {")
for valueName in f.order:
prefixMatched = ""
for p in prefixes:
if valueName.startswith(p) and valueName not in deadValues:
prefixMatched = p
if prefixMatched:
vEnum = f.features[valueName]
valueNameNoPrefix = ""
if valueName in f.aliases:
valueNameNoPrefix = f.aliases[valueName]
else:
valueNameNoPrefix = valueName[len(prefixMatched):]
if not valueNameNoPrefix: # Removed whole name
valueNameNoPrefix = valueName
if valueNameNoPrefix.startswith("SC_"):
valueNameNoPrefix = valueNameNoPrefix[len("SC_"):]
pascalName = Face.PascalCase(valueNameNoPrefix)
out.append("\t" + pascalName + " = " + vEnum["Value"] + ",")
out.append("};")
out.append("")
out.append("enum class Notification {")
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["evt"]:
out.append("\t" + name + " = " + v["Value"] + ",")
out.append("};")
return out
def HConstants(f):
# Constants not in an eumeration
out = []
allEnumPrefixes = [
"SCE_", # Lexical styles
"SCI_", # Message number allocation
"SCEN_", # Notifications sent with WM_COMMAND
]
for _n, v in f.features.items():
if v["Category"] != "Deprecated":
# Only want non-deprecated enumerations and lexers are not part of Scintilla API
if v["FeatureType"] in ["enu"]:
allEnumPrefixes.extend(v["Value"].split())
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
# Only want non-deprecated enumerations and lexers are not part of Scintilla API
if v["FeatureType"] in ["val"]:
hasPrefix = False
for prefix in allEnumPrefixes:
if name.startswith(prefix):
hasPrefix = True
if not hasPrefix:
if name.startswith("SC_"):
name = name[3:]
type = "int"
if name == "INVALID_POSITION":
type = "Position"
out.append("constexpr " + type + " " + Face.PascalCase(name) + " = " + v["Value"] + ";")
return out
def HMethods(f):
out = []
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
if v["FeatureType"] == "get" and name.startswith("Get"):
name = name[len("Get"):]
Updated to Scintilla 5.4.1 & Lexilla 5.3.0 Scintilla 5.4.1 https://www.scintilla.org/scintilla541.zip Released 27 December 2023. 1. Add IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in a Scintilla instance. This feature is provisonal and may change before being declared stable. For better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require changes to client code that uses document pointer APIs DocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument. 2. Ctrl-click on a selection deselects it in multiple selection mode. 3. Add SCI_SELECTIONFROMPOINT for modifying multiple selections. 4. Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to simplify selection mode manipulation. 5. Improve performance of global replace by reducing cache invalidation overhead. [Feature #1502](https://sourceforge.net/p/scintilla/feature-requests/1502/). 6. Fix regular expression search for "\<" matching beginning of search when not beginning of word and for "\>" not matching line end. [Bug #2157](https://sourceforge.net/p/scintilla/bugs/2157/). 7. Fix regular expression search failure when search for "\<" followed by search for "\>". [Bug #2413](https://sourceforge.net/p/scintilla/bugs/2413/). 8. Fix regular expression assertion (^, $, \b. \B) failures when using SCFIND_CXX11REGEX. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 9. Fix regular expression bug in reverse direction where shortened match returned. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 10. Avoid character fragments in regular expression search results. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 11. With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE. 12. Protect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from application changing target in notification handlers. [Bug #2289](https://sourceforge.net/p/scintilla/bugs/2289/). Lexilla 5.3.0 https://www.scintilla.org/lexilla530.zip Released 27 December 2023. 1. Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header. [Bug #2421](https://sourceforge.net/p/scintilla/bugs/2421/). 2. Bash: Fix shift operator << incorrectly recognized as here-doc. [Issue #215](https://github.com/ScintillaOrg/lexilla/issues/215). 3. Bash: Fix termination of '${' with first unquoted '}' instead of nesting. [Issue #216](https://github.com/ScintillaOrg/lexilla/issues/216). 4. HTML: JavaScript double-quoted strings may escape line end with '\'. [Issue #214](https://github.com/ScintillaOrg/lexilla/issues/214). 5. Lua: recognize --- doc comments. Defined by [LDoc](https://github.com/lunarmodules/ldoc). Does not recognize --[[-- doc comments which seem less common. Close #14375
1 year ago
retType = ActualTypeName(v["ReturnType"], name)
if IsEnumeration(retType):
retType = namespace + retType
parameters, args, callName = ParametersArgsCallname(v)
out.append("\t" + JoinTypeAndIdentifier(retType, name) + "(" + parameters + ");")
# Extra method for stringresult that returns std::string
if v["Param2Type"] == "stringresult":
out.append("\t" + JoinTypeAndIdentifier("std::string", name) + \
"(" + ParametersExceptLast(parameters) + ");")
return out
def CXXMethods(f):
out = []
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
msgName = "Message::" + name
if v["FeatureType"] == "get" and name.startswith("Get"):
name = name[len("Get"):]
Updated to Scintilla 5.4.1 & Lexilla 5.3.0 Scintilla 5.4.1 https://www.scintilla.org/scintilla541.zip Released 27 December 2023. 1. Add IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in a Scintilla instance. This feature is provisonal and may change before being declared stable. For better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require changes to client code that uses document pointer APIs DocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument. 2. Ctrl-click on a selection deselects it in multiple selection mode. 3. Add SCI_SELECTIONFROMPOINT for modifying multiple selections. 4. Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to simplify selection mode manipulation. 5. Improve performance of global replace by reducing cache invalidation overhead. [Feature #1502](https://sourceforge.net/p/scintilla/feature-requests/1502/). 6. Fix regular expression search for "\<" matching beginning of search when not beginning of word and for "\>" not matching line end. [Bug #2157](https://sourceforge.net/p/scintilla/bugs/2157/). 7. Fix regular expression search failure when search for "\<" followed by search for "\>". [Bug #2413](https://sourceforge.net/p/scintilla/bugs/2413/). 8. Fix regular expression assertion (^, $, \b. \B) failures when using SCFIND_CXX11REGEX. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 9. Fix regular expression bug in reverse direction where shortened match returned. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 10. Avoid character fragments in regular expression search results. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 11. With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE. 12. Protect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from application changing target in notification handlers. [Bug #2289](https://sourceforge.net/p/scintilla/bugs/2289/). Lexilla 5.3.0 https://www.scintilla.org/lexilla530.zip Released 27 December 2023. 1. Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header. [Bug #2421](https://sourceforge.net/p/scintilla/bugs/2421/). 2. Bash: Fix shift operator << incorrectly recognized as here-doc. [Issue #215](https://github.com/ScintillaOrg/lexilla/issues/215). 3. Bash: Fix termination of '${' with first unquoted '}' instead of nesting. [Issue #216](https://github.com/ScintillaOrg/lexilla/issues/216). 4. HTML: JavaScript double-quoted strings may escape line end with '\'. [Issue #214](https://github.com/ScintillaOrg/lexilla/issues/214). 5. Lua: recognize --- doc comments. Defined by [LDoc](https://github.com/lunarmodules/ldoc). Does not recognize --[[-- doc comments which seem less common. Close #14375
1 year ago
retType = ActualTypeName(v["ReturnType"], name)
parameters, args, callName = ParametersArgsCallname(v)
returnIfNeeded = "return " if retType != "void" else ""
out.append(JoinTypeAndIdentifier(retType, "ScintillaCall::" + name) + "(" + parameters + ")" + " {")
retCast = ""
retCastEnd = ""
Updated to Scintilla 5.4.1 & Lexilla 5.3.0 Scintilla 5.4.1 https://www.scintilla.org/scintilla541.zip Released 27 December 2023. 1. Add IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in a Scintilla instance. This feature is provisonal and may change before being declared stable. For better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require changes to client code that uses document pointer APIs DocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument. 2. Ctrl-click on a selection deselects it in multiple selection mode. 3. Add SCI_SELECTIONFROMPOINT for modifying multiple selections. 4. Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to simplify selection mode manipulation. 5. Improve performance of global replace by reducing cache invalidation overhead. [Feature #1502](https://sourceforge.net/p/scintilla/feature-requests/1502/). 6. Fix regular expression search for "\<" matching beginning of search when not beginning of word and for "\>" not matching line end. [Bug #2157](https://sourceforge.net/p/scintilla/bugs/2157/). 7. Fix regular expression search failure when search for "\<" followed by search for "\>". [Bug #2413](https://sourceforge.net/p/scintilla/bugs/2413/). 8. Fix regular expression assertion (^, $, \b. \B) failures when using SCFIND_CXX11REGEX. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 9. Fix regular expression bug in reverse direction where shortened match returned. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 10. Avoid character fragments in regular expression search results. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/). 11. With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE. 12. Protect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from application changing target in notification handlers. [Bug #2289](https://sourceforge.net/p/scintilla/bugs/2289/). Lexilla 5.3.0 https://www.scintilla.org/lexilla530.zip Released 27 December 2023. 1. Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header. [Bug #2421](https://sourceforge.net/p/scintilla/bugs/2421/). 2. Bash: Fix shift operator << incorrectly recognized as here-doc. [Issue #215](https://github.com/ScintillaOrg/lexilla/issues/215). 3. Bash: Fix termination of '${' with first unquoted '}' instead of nesting. [Issue #216](https://github.com/ScintillaOrg/lexilla/issues/216). 4. HTML: JavaScript double-quoted strings may escape line end with '\'. [Issue #214](https://github.com/ScintillaOrg/lexilla/issues/214). 5. Lua: recognize --- doc comments. Defined by [LDoc](https://github.com/lunarmodules/ldoc). Does not recognize --[[-- doc comments which seem less common. Close #14375
1 year ago
if retType.endswith("*"):
retCast = "reinterpret_cast<" + retType + ">("
retCastEnd = ")"
elif retType not in basicTypes or retType in ["int", "Colour", "ColourAlpha"]:
if IsEnumeration(retType):
retType = namespace + retType
retCast = "static_cast<" + retType + ">("
retCastEnd = ")"
out.append("\t" + returnIfNeeded + retCast + callName + "(" + msgName + args + ")" + retCastEnd + ";")
out.append("}")
out.append("")
# Extra method for stringresult that returns std::string
if v["Param2Type"] == "stringresult":
paramList = ParametersExceptLast(parameters)
argList = ParametersExceptLast(args)
out.append(JoinTypeAndIdentifier("std::string", "ScintillaCall::" + name) + \
"(" + paramList + ") {")
out.append("\treturn CallReturnString(" + msgName + argList + ");")
out.append("}")
out.append("")
return out
def RegenerateAll(root):
HFacer.RegenerateAll(root, False)
f = Face.Face()
include = root / "include"
f.ReadFromFile(include / "Scintilla.iface")
FileGenerator.Regenerate(include / "ScintillaMessages.h", "//", HMessages(f))
FileGenerator.Regenerate(include / "ScintillaTypes.h", "//", HEnumerations(f), HConstants(f))
FileGenerator.Regenerate(include / "ScintillaCall.h", "//", HMethods(f))
FileGenerator.Regenerate(root / "call" / "ScintillaCall.cxx", "//", CXXMethods(f))
if __name__ == "__main__":
RegenerateAll(pathlib.Path(__file__).resolve().parent.parent)