Re: [code] [scintillua] Docs and lexer number

From: Mitchell <m.att.foicica.com>
Date: Fri, 23 Mar 2012 08:55:17 -0400 (EDT)

Hi Nils,

On Thu, 22 Mar 2012, Nils Nordman wrote:

> Hi,
>
> some things I came across while playing with Scintillua:
>
> First, the pseudo-code at
> http://foicica.com/scintillua/api/Scintillua.html is incorrect as far
> as I can tell:
>
> SendScintilla(sci, SCI_PRIVATELEXERCALL, SCI_SETDOCPOINTER, sci)
>
> Here sci is the return from scintilla_new, but the parameter should be
> the direct pointer (as is noted further down in the documentation for
> SCI_SETDOCPOINTER).

You are correct. I will update the documentation. Thanks for catching this
subtle error.

> Secondly a question: Any reason why LexLPeg.cxx specify
> "SCLEX_AUTOMATIC - 1" as the lexer number instead of "SCLEX_AUTOMATIC"
> which would appear to be the correct choice?

I think *external* lexers are assigned their own id based on
SCLEX_AUTOMATIC, so you would be correct, but the instance you mention is
when LexLPeg.cxx is being compiled as an *internal* lexer, so it needs a
non-automatic id. I picked one that would be okay as long as Scintilla is
not being compiled with 999 different lexers.

Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Fri 23 Mar 2012 - 08:55:17 EDT

This archive was generated by hypermail 2.2.0 : Sat 24 Mar 2012 - 06:44:02 EDT