[Github-comments] [geany/geany] Add Prolog filetype support (PR #3171)

Robert Di Pardo notifications at github.com
Sun May 15 13:12:01 UTC 2022


> Do you have any good source of sample files that could be used as unit tests? 

Before anything, you'll need to apply this patch: [Fix-EOL-splitting-in-LexVisualProlog.diff.txt](https://github.com/geany/geany/files/8694983/Fix-EOL-splitting-in-LexVisualProlog.diff.txt)

Lexilla's testing protocol has dramatically improved over the past year, and it now checks for consistency across EOL modes. A hard failure is raised if the CR and LF of a Windows EOL is in two different styles, e.g.,

![vpl-eol-splits](https://user-images.githubusercontent.com/59004801/168474150-2678acee-8906-450a-9cf3-594972442e79.png)

In fairness to the lexer, the problem really comes from the flawed implementation of `StyleContext::atLineEnd` (mitigated in [Lexilla 5.1.0][0]). It doesn't account for newlines longer than a single character [^1] , so you can end up with `<false>CR<true>LF`

[^1]: https://github.com/ScintillaOrg/lexilla/blob/a35a59845e793d9d37d249cf097e71fecc5f4bcd/lexlib/StyleContext.h#L35-L40

[0]: https://github.com/ScintillaOrg/lexilla/blob/9818085b561cc59243afc3f768db20664e6a135b/lexlib/StyleContext.h

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3171#issuecomment-1126938625
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3171/c1126938625 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220515/4d06d98e/attachment.htm>


More information about the Github-comments mailing list