Skip to content

Conversation

@simonkrauter
Copy link

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.

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.
@simonkrauter
Copy link
Author

Note: The changes are part of a pull request for Geany (geany/geany#4417).

@nyamatongwe
Copy link
Member

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.

@nyamatongwe
Copy link
Member

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.

@nyamatongwe nyamatongwe added access Bugs with LexillaAccess module, not main Lexilla library and removed access Bugs with LexillaAccess module, not main Lexilla library labels Aug 18, 2025
@zufuliu
Copy link
Contributor

zufuliu commented Aug 18, 2025

@nyamatongwe
Copy link
Member

The Zig example also shows adding tests which helps keep features working.

@nyamatongwe nyamatongwe added the nim Caused by the Nim lexer label Oct 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nim Caused by the Nim lexer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants