notepad-plus-plus/lexilla/access/LexillaAccess.h
Christian Grasser a61b03ea88 Update Scintilla from v4.4.6 to v5.2.1 and add Lexilla v5.1.5
Update with https://www.scintilla.org/scintilla521.zip
            https://www.scintilla.org/lexilla515.zip

- fix setting to bring Scintilla::PositionCR from ScintillaStructures.h inline with Sci_Position.h Sci_PositionCR
- add workaround to enable lexer for searchResult
commented out SCI_SETILEXER call on searchResult to get one result which is correctly handled by the lexer,
added comment about the current problem with property @MarkingsStruct which seems to disappear after call to SCI_SETILEXER or CreateLexer
- corrected usage of ObjC lexer
- removed unnecessary filter stuff
- use own sections for scintilla and lexilla build targets and allow parallel builds
- as libscilex is no longer existing, changed to libscintilla
- adapt makefiles and cmake
- use VS2019
- started simple changes for createlexer adaptations, nullpointercheck missing on return of lexer name from deprecated LexerNameFromID -> undefined behaviour
- movement from id -> lexer name, mostly done via LexerNameFromID + switching off corresponding compiler warning
- changed to SCI_SETILEXER from SCI_SETLEXER, SCI_SETLEXERLANGUAGE needs to be corrected, see Scintilla5Migration.html
- just commented out: SCI_LOADLEXERLIBRARY

Fix #10504, close #11419
2022-03-27 17:12:53 +02:00

36 lines
1.2 KiB
C++

// SciTE - Scintilla based Text Editor
/** @file LexillaAccess.h
** Interface to loadable lexers.
** This does not depend on SciTE code so can be copied out into other projects.
**/
// Copyright 2019 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef LEXILLAACCESS_H
#define LEXILLAACCESS_H
namespace Lexilla {
// Directory to load default Lexilla from, commonly the directory of the application.
void SetDefaultDirectory(std::string_view directory);
// Specify CreateLexer when statically linked so no hard dependency in LexillaAccess
// so it doesn't have to be built in two forms - static and dynamic.
void SetDefault(CreateLexerFn pCreate) noexcept;
// sharedLibraryPaths is a ';' separated list of shared libraries to load.
// On Win32 it is treated as UTF-8 and on Unix it is passed to dlopen directly.
// Return true if any shared libraries are loaded.
bool Load(std::string_view sharedLibraryPaths);
Scintilla::ILexer5 *MakeLexer(std::string_view languageName);
std::vector<std::string> Lexers();
[[deprecated]] std::string NameFromID(int identifier);
std::vector<std::string> LibraryProperties();
void SetProperty(const char *key, const char *value);
}
#endif