Could you please change the ticket title to "[PATCH] Fix inconsistency with dot styling in Nim"?
The issue was broader than I thought. Dots were inconsistently being styled as both SCE_NIM_IDENTIFIER and SCE_NIM_OPERATOR depending on what the previous character is. Now it's all fixed and dots are always considered an operator.
Pictures can show styling issues but these ones are difficult to differentiate as one '.' is just a bit smaller and greyer than the other. Using a background colour with style.nim.15=bold,back:#D0F0FF make it easier to see.
Including a copy of the example as text helps further by allowing the text to be cut and paste which is less effort and does not suffer transcription errors.
To ensure that this change is checked automatically in the future, I have added a unit test test/examples/x.nim with its corresponding x.nim.styled. To run the test on Windows, build bin/SciLexer.DLL then python lexTests.py. If the lex produces a different result to x.nim.styled then the new lex is saved to x.nim.new and the differences can be examined. If the new lex is correct, then move it to x.nim.styled and include x.nim.styled in the patch. For a new feature or bug fix, add an example to x.nim, run the test, and update x.nim.styled from x.nim.new if correct.
I'm trying to run the test. Executed lexTests.py, but it just returns "Can't find SciLexer.DLL". Traced that return value to an exception in XiteWin.py. Am I missing something here? My scintilla\bin directory has the following:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Python executable and SciLexer.DLL must match in word-size. Use a 64-bit SciLexer.DLL with a 64-bit Python, and similarly with 32-bit executables. You can check Python's architecture with
Please ignore this patch for now. I'm looking into something better.
Could you please change the ticket title to "[PATCH] Fix inconsistency with dot styling in Nim"?
The issue was broader than I thought. Dots were inconsistently being styled as both
SCE_NIM_IDENTIFIER
andSCE_NIM_OPERATOR
depending on what the previous character is. Now it's all fixed and dots are always considered an operator.Before:

After:

Pictures can show styling issues but these ones are difficult to differentiate as one '.' is just a bit smaller and greyer than the other. Using a background colour with
style.nim.15=bold,back:#D0F0FF
make it easier to see.Including a copy of the example as text helps further by allowing the text to be cut and paste which is less effort and does not suffer transcription errors.
To ensure that this change is checked automatically in the future, I have added a unit test test/examples/x.nim with its corresponding x.nim.styled. To run the test on Windows, build bin/SciLexer.DLL then
python lexTests.py
. If the lex produces a different result to x.nim.styled then the new lex is saved to x.nim.new and the differences can be examined. If the new lex is correct, then move it to x.nim.styled and include x.nim.styled in the patch. For a new feature or bug fix, add an example to x.nim, run the test, and update x.nim.styled from x.nim.new if correct.Changes committed as [99281d].
Related
Commit: [99281d]
I'm trying to run the test. Executed

lexTests.py
, but it just returns "Can't find SciLexer.DLL". Traced that return value to an exception inXiteWin.py
. Am I missing something here? My scintilla\bin directory has the following:Ensure the current directory is scintilla/test.
The Python executable and SciLexer.DLL must match in word-size. Use a 64-bit SciLexer.DLL with a 64-bit Python, and similarly with 32-bit executables. You can check Python's architecture with
Thanks for the help. I was running a 32 bit Python against a 64 bit DLL. ¯_(ツ)_/¯