Re: Patch for Scintillua style handling
"'Neil Hodgson' via scite-interest" <[email protected]>
| Newsgroups | gmane.editors.scite.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Mitchell,
> Attached is a small patch against SciTE 5.2.4 that updates property handling for Scintillua lexers.
This has grown enough that it may be better as its own method where its more obvious that the code is Scintillua-specific.
The loops are a bit complex. The subtraction of numPredefined in the max expression isn't clear to me - if the lexer returns '4', say, then no lexer styles will be processed. If I've understood correctly, there is a range of named styles and a range of predefined styles that may or may not overlap so its divided into 3 ranges (named-before, predefined, named-after). I'd think this was clearer as enumerating up to max of named and predefined then ignoring when in the (potential) hole (namedStyles..StyleDefault).
for (i=0, i < max(namedStyles, LastPredefined+1); i++) {
if (i < namedStyles || i >= StyleDefault) {
// find the name and apply it.
}
}
'constexpr' should be used for compile-time constants like LastPredefined and numPredefined as they aren't just locally const and Visual C++ shows warnings.
Neil
--
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/633F3D80-6E3A-4ACB-8963-4EB0B494C88E%40me.com.