fsharp / zarchive-vim-fsharp

F# bindings for vim
MIT License
143 stars 34 forks source link

Syntax improvements #73

Closed MisanthropicBit closed 7 years ago

MisanthropicBit commented 7 years ago

This PR fixes two syntax issues and introduces one improvement.

When a single-line comment is contained within a multi-line comment on the same line as the closing marker *), like in the screenshot below, the regex of the single-line comment greedily matches the end of the multi-line comment *) such that the rest of the file is commented out (but can still be compiled etc.).

The other fix adds private to the list of function symbols so that the function name is correctly highlighted as with e.g. rec.

Backtick strings (for e.g. FsCheck) are now highlighted as regular strings. The differences can be seen below.

screen shot 2017-02-25 at 10 53 34 screen shot 2017-02-25 at 10 53 47

I am new to F#, but I hope that the changes are still valid. I tested the changes with some F# soure files from a project and it does not seem to break anything else.

kjnilsson commented 7 years ago

Great, thanks.