Nim: Separate built-in identifiers from keywords#327
Nim: Separate built-in identifiers from keywords#327simonkrauter wants to merge 1 commit intoScintillaOrg:masterfrom
Conversation
This change introduces a distinction between keywords and built-in identifiers in the Nim lexer. Details: - Add a second keyword list `builtin_identifiers`. - Assign new style `SCE_NIM_WORD2` to built-in identifiers. - The implementation was roughly copied from the Python lexer.
|
Note: The changes are part of a pull request for Geany (geany/geany#4417). |
|
I'm on holiday with only a phone so can't properly review code. One problem with the patch is that it changes the numbers for lexical classes (SCE_...) which breaks binary compatibility. Just add the new class at the end leaving all the existing classes as they were. |
|
The lexical classes originate in the .iface file and are then generated by a script into the .h file. So the change has to go in the .iface. |
|
Commit 942ac3f (from PR #287) is an example for adding (appending) a new style/lexical class. https://github.com/ScintillaOrg/lexilla/tree/master/include/SciLexer.h is auto generated from https://github.com/ScintillaOrg/lexilla/tree/master/include/LexicalStyles.h by run https://github.com/ScintillaOrg/lexilla/tree/master/scripts/LexFacer.py |
|
The Zig example also shows adding tests which helps keep features working. |
This change introduces a distinction between keywords and built-in identifiers in the Nim lexer.
Details:
builtin_identifiers.SCE_NIM_WORD2to built-in identifiers.