Hallo.

...Indices to highlighting_styles_UNI are completely independent.

You are right. I was confused by the comment.

So I plan to assign to SCE_UNI_K_.. values from 100 and to SCE_UNI_S_.. values from 200.

You can't do that (at least if you plan to submit your lexer to Lexilla) ...

If Keyword indices are completely independant from Style indices, as you told above, that's o.k. for me. No need to number it from 100 or 200 in real world. It would only have prooved independance to me.

highlighting_keywords_UNI will just have to use the correct indices.

For me, that's a great drawback of geany vs. lexilla source code. Every time any lexer feature is added to lexilla, highlightingmappings.h needs to be updated manually, keeping order troublesomly. I'm not sure, but even now, there are differences.

A summary of what is defined for each lexer in highlightingmappings.h is attached:
geany_2.0.0_20241219_lexer_definitions.zip

Examples of discrepancies:

I propose to introduce keywordlist constants: SCE_[LANG]_K_[DESCRIPTION] and rename existing style constants SCE_[LANG]_[DESCRIPTION] to SCE_[LANG]_S_[DESCRIPTION]. Keywordlist constants can be used in highlighting_keywords_[LANG] and in source code (e.g. in document.c, see above) and will improve readability and reduce fault liability SciLexer.h: SCE_C_K_GLOBALCLASSESANDTYPES = 3; and document.c: keyword_idx = SCE_C_K_GLOBALCLASSESANDTYPES;.

In any case, if you plan to submit a pull request with the lexer to Geany, you have to get it merged to the Lexilla project first - we only accept official lexers.

That's the plan. A feature update to LexPascal will be offered to Lexilla project whithin next days. After that, I'll finish work on new Lexer and offer to Lexilla, too.

Thank you for your answer and time.
br HoTschir


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/repo-discussions/4154/comments/11617458@github.com>