catala
catala copied to clipboard
Handle CRLF line endings
trafficstars
The lexer (https://github.com/CatalaLang/catala/blob/master/compiler/surface/lexer.cppo.ml) is not resilient to CRLF (Windows) line endings (\r\n), basically all occurences of \n should be checked to see if they also work with \r\n.
We might want to handle them anyway, but note that on Windows, conversion should happen automatically (since we use open_in and not open_in_bin) and the lexer would only see \n even if the actual file contains \r\n.
So the issue here is with Windows-style files appearing in a Linux environment.