From eed707bb9ad6da944af207a51e4a8d460d6c6846 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 22 Dec 2019 22:36:51 +1100 Subject: Define ILexer5 with methods for retrieving name, ID, and property values. Implement ILexer5 on object lexers. Implement ILexer5 on LexerSimple wrapper for function lexers. --- doc/ScintillaDoc.html | 25 ++++++++++++++++++++++++- doc/ScintillaHistory.html | 4 ++++ 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 3a25677c7..53bfec16a 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -285,7 +285,7 @@

Lexilla follows the external lexer protocol so can be loaded by applications that support this. As the protocol only supports object lexers, an additional function CreateLexer(const char *name) - is exposed which will create a lexer object (ILexer4 *) for any object lexer or function lexer. + is exposed which will create a lexer object (ILexer5 *) for any object lexer or function lexer.

Contents

@@ -7123,6 +7123,8 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ can be used during lexing. For example a C++ lexer may store a set of preprocessor definitions or variable declarations and style these depending on their role.

+

ILexer4 is extended with the provisional ILexer5 interface to support use of Lexilla.

+

A set of helper classes allows older lexers defined by functions to be used in Scintilla.

ILexer4

@@ -7157,6 +7159,18 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ };
+

ILexer5

+ +
+class ILexer5 : public ILexer4 {
+public:
+        virtual const char * SCI_METHOD GetName() = 0;
+        virtual int SCI_METHOD  GetIdentifier() = 0;
+        virtual const char * SCI_METHOD PropertyGet(const char *key) = 0;
+};
+
+
+

The types Sci_Position and Sci_PositionU are used for positions and line numbers in the document. With Scintilla 4, 64-bit builds define these as 64-bit types to allow future implementation of documents larger than 2 GB. @@ -7204,6 +7218,15 @@ A set of common tags and conventions for combining them is DescriptionOfStyle is an English description of the style like "Function or method name definition".

+

GetName and GetIdentifier may be called +to discover the identity of a lexer and be used to implement +SCI_GETLEXERLANGUAGE and +SCI_GETLEXER.

+ +

PropertyGet may be called +to discover the value of a property stored by a lexer and be used to implement +SCI_GETPROPERTY.

+

IDocument

diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index ddad79d68..282118ded 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -570,6 +570,10 @@ Lexers made available as Lexilla library.
  • + ILexer5 interface defined provisionally to support use of Lexilla. + The details of this interface may change before being stabilised in Scintilla 5.0. +
  • +
  • SCI_LOADLEXERLIBRARY implemented on Cocoa.
  • -- cgit v1.2.3