"" qq{} `` qx{} // m{} qr{} s{}{} <<HERE
For things like qq{}, interpolation highlighting is not done when
the a single quote delimiter is used. Skipping highlighting of
more complex forms like $a[1], $b->{key} etc. Too much of talk of
'heuristics' in the documentation... leaving that for another day.
Also skipping highlighting of interpolated special variables
except for the usual $_ and @_.
This is roughly the behaviour of the oldish gvim and Komodo I have
currently, although they do not seem to do variable interpolation
highlighting for <<HERE blocks.
For the new style numbers, the plan is they are offset in value
from the parent style by a fixed, identical constant, in case I
want to use that behaviour. If this assumption is not desirable,
let me know and I'll skip the use of this assumption.
--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
> Preliminary work code and test cases (simple variable interpolation
> for double-quoted strings only):
VarInterpolation doesn't need to be marked with SCI_METHOD since it
is only used locally. SCI_METHOD is there to force a particular
calling convention (stdcall) so that lexers can be used if they are
separately compiled from Scintilla with a different calling convention
as may be the case with external lexers. Forcing stdcall on a method
may stop compiler optimizations like using fastcall or thiscall.
Otherwise, it looks good.
Neil
OK
> Otherwise, it looks good.
Hey, not so fast. It's just a preview, I pinged and got the
feedback I need from Neil.
I've done "" qq{} `` qx{}, hope to finish it before the end of the
month. A few hundred more test cases to check...
The final to-be-applied version will be posted to the Scintilla SF
feature tracker. You can grab it once it gets into hg.
> Note: 'perl -c perl-test-interpolation.pl' fails. Is it that intended?
Hmmm... perhaps you should look at the contents of the file. :-)
Easy, use automation -- make sure you're signed up for:
http://groups.google.com/group/scintilla-tracker
Variable interpolation is the last biggie that's missing from
LexPerl. I don't remember anything else that's really worth doing
for LexPerl...
> As soon as I have
> a working LexPerl6.cxx, i'll post it on this group.
Good to know, and looking forward to writing some Perl 6 on SciTE.
I never got started on doing anything serious on Perl 6. If you
have a good set of tests for Perl 6 highlighting, I'd be
interested to dabble in it in the (very vague) future. IMHO, it
was possible to get Perl 5 highlighted mostly correctly mainly by
amassing a large set of test cases.
Interim code. Basic variable interpolation for:
"" qq{} `` qx{} // m{} qr{} s{}{}
Still to do: HERE docs.
http://sites.google.com/site/rubblepiles/scintilla-and-scite-stuff/LexPerl-interpolate.zip
By the way, I started experimenting more with LexPerl.cxx improved
styles using Wx::Scintilla
http://padre.perlide.org/trac/browser/trunk/Wx-Scintilla/share/perl_editor.pl?rev=15491
One thing to note, $self->SetStyleBits(7) is needed otherwise we'll
have indicators all over the place. Am i doing something wrong here?
GetStyleBitsNeeded() still reports only 5 needed bits.
Regards,
Ahmad M. Zawawi
> --
> You received this message because you are subscribed to the Google Groups
> "scintilla-interest" group.
> To post to this group, send email to scintilla...@googlegroups.com.
> To unsubscribe from this group, send email to
> scintilla-inter...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/scintilla-interest?hl=en.
>
>
Yes, I think. (I hack lexers only, I'm all at sea with the other
bits of Scintilla.)
> One thing to note, $self->SetStyleBits(7) is needed otherwise we'll
> have indicators all over the place. Am i doing something wrong here?
> GetStyleBitsNeeded() still reports only 5 needed bits.
SCI_GETSTYLEBITSNEEDED returns 8 for me. The number of bits is set
as the last parameter in the LexerModule constructor:
LexerModule lmPerl(SCLEX_PERL, LexerPerl::LexerFactoryPerl, "perl",
perlWordListDesc, 8);
Neil