From f85830599f08d6e80ed053e9f70cbd3922e68ea1 Mon Sep 17 00:00:00 2001 From: mitchell Date: Wed, 11 Mar 2020 22:43:38 -0400 Subject: LexLPeg now implements DefaultLexer and NameOfStyle(). The SCI_PRIVATELEXERCALL(styleNum, name) API is no longer supported. --- doc/LPegLexer.html | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'doc/LPegLexer.html') diff --git a/doc/LPegLexer.html b/doc/LPegLexer.html index 02b1dbdd2..0e1b81142 100644 --- a/doc/LPegLexer.html +++ b/doc/LPegLexer.html @@ -231,7 +231,8 @@

Using the LPeg Lexer

-

Your application communicates with the LPeg lexer using Scintilla's +

Your application primarily communicates with the LPeg lexer using + Scintilla's SCI_PRIVATELEXERCALL API. The operation constants recognized by the LPeg lexer are based on Scintilla's existing named constants. Note that some of the names of the @@ -280,9 +281,9 @@ SCI_PRIVATELEXERCALL(SCI_GETSTATUS, char *errorMessage) → int
SCI_PRIVATELEXERCALL(SCI_LOADLEXERLIBRARY, const char *path)
SCI_PRIVATELEXERCALL(SCI_PROPERTYNAMES, char *names) → int
- SCI_PRIVATELEXERCALL(int styleNum, char *styleName) → int
SCI_PRIVATELEXERCALL(SCI_SETDOCPOINTER, int sci)
SCI_PRIVATELEXERCALL(SCI_SETLEXERLANGUAGE, languageName)
+ SCI_NAMEOFSTYLE(int style, char *name) → int

SCI_PRIVATELEXERCALL(SCI_CHANGELEXERSTATE, lua_State *L)
@@ -401,19 +402,6 @@

See also: SCI_SETLEXERLANGUAGE

-

SCI_PRIVATELEXERCALL(int styleNum, char *styleName) → int
- Returns the length of the token name associated with the given style number - or stores the style name into the given buffer. If the buffer is long - enough, the string is terminated by a 0 character.

- -

Usage:

- -

-    style = SendScintilla(sci, SCI_GETSTYLEAT, pos, 0)
-    SendScintilla(sci, SCI_PRIVATELEXERCALL, style, token)
-    // token now contains the name of the style at pos
-    
-

SCI_PRIVATELEXERCALL(SCI_SETDOCPOINTER, int sci)
Tells the LPeg lexer the address of the Scintilla window (obtained via Scintilla's @@ -456,6 +444,18 @@ SCI_SETDOCPOINTER, SCI_PROPERTYNAMES

+

SCI_NAMEOFSTYLE(int style, char *name) → int
+ Retrieves the name of a style. Note this is not a + SCI_PRIVATELEXERCALL.

+ +

Usage:

+ +

+    style = SendScintilla(sci, SCI_GETSTYLEAT, pos, 0)
+    SendScintilla(sci, SCI_NAMEOFSTYLE, style, token)
+    // token now contains the name of the style at pos
+    
+

Using Scintilla as a Lua Library

In order to use Scintilla as a Lua library, simply place the lexlua/ -- cgit v1.2.3