When parsing and analysing the Scintilla's interface file, I have found the following issues:
You should be able to correct points 2, 3, 5, 6, 7 and 9 within a matter of minutes. 1, 4 and 8 might take a little longer. I was wondering if I should post 9 different bug reports .. but then, I didn't want to spam the tracker...
1:: (ERR) enu IndicatorStyle (line 569)
- INDIC_STRAIGHTBOX and INDIC_CONTAINER
- value collision as both having value 8
2:: (WARN) enu FindOption (line 858)
- has mixed int/hex values
- write all int-values as hex-values
3:: (WARN) enu FontQuality (line 1294)
- has mixed int/hex values
- write all int-values as hex-values
4:: (WARN) additional problem with FontQuality
- SC_EFF_QUALITY_ANTIALIASED and SC_EFF_QUALITY_NON_ANTIALIASED
- one might run into the problem of having both set at the same time
- better select one and declare the other one as deprecated
5:: (ERR) lexer-id not defined (line 2707)
- there is no value definition for SCLEX_ASP
6:: (ERR) lexer-id not defined (line 2708)
- there is no value definition for SCLEX_PHP
- SCLEX_PHPSCRIPT seems to be available
7:: (ERR) lexer-id not defined (line 3949)
- there is no value definition for SCLEX_MAGIKSF
- SCLEX_MAGIK seems to be available
8:: (ERR) lex CoffeeScript (line 4188)
- SCE_COFFEESCRIPT_HASHQUOTEDSTRING and SCE_COFFEESCRIPT_COMMENTBLOCK
- value collision as both having value 22
9:: (ERR) lex KVIrc (line 4330)
- has no values assigned to it
- replace prefix "SCLEX_KVIRC_" with "SCE_KVIRC_"
AFAICT, SCE_COFFEESCRIPT_HASHQUOTEDSTRING isn't used and can be removed.
so does STRINGRAW and TRIPLEVERBATIM, as noted in [#1518]
However, I don't know what is the policy on removing existing states, since they are exposed in the API
Related
Bugs:
#1518Last edit: Colomban Wendling 2013-11-19
Its a judgment call and depends on the impact since having additional unused constants does no great harm. If its possible that these may be implemented in the future then they should stay otherwise they should be removed. For a more widely used lexer like C++ or HTML, then more care would be warranted.
At the bottom of the interface file, there is a "Deprecated" category. So I assume - if they are to be removed - they will go through a grace period before their final removal.
The deprecated category is used for features that were used and important in the past, not symbols that may be a mistake. Moving features into deprecation is rare.
1: INDIC_STRAIGHTBOX and INDIC_CONTAINER are used for different purposes and do not clash.
2: OK
3: The hex constant is to be able to break up the value into subfields in the future. The decimal constants are values to go into the only currently defined subfield.
4: Having both SC_EFF_QUALITY_ANTIALIASED and SC_EFF_QUALITY_NON_ANTIALIASED is reasonable since they have different appearances.
5,6: OK to remove since SCLEX_ASP and SCLEX_PHP were removed in 2009. SCLEX_PHPSCRIPT is for using PHP as a scripting language instead of embedded into HTML.
7: OK
8: Eric says to drop SCE_COFFEESCRIPT_HASHQUOTEDSTRING.
9: OK.
A patch for these changes:
1: I was pretty certain that C#'s enum types wouldn't allow different constants with the same value. Surprisingly I was wrong.
Committed as [2d9376].
Related
Commit: [2d9376]
Diff: