atom / language-csharp

C# language support for Atom
Other
62 stars 52 forks source link

Update csharp.cson, fix converter paths #123

Closed worldbeater closed 6 years ago

worldbeater commented 6 years ago

Description of the Change

As you know, language-csharp grammar that is used by both Atom and Github comes from upstream. So this PR updates the grammar as there were a lot of fixes and improvements since the grammar was updated last time (https://github.com/dotnet/csharp-tmLanguage/pull/114 https://github.com/dotnet/csharp-tmLanguage/pull/132 https://github.com/dotnet/csharp-tmLanguage/pull/113 etc.)

Python script from scripts/ folder was used to keep PCRE support, it removed dashes from group names. Manual fixes were applied according to these commits: https://github.com/atom/language-csharp/commit/3b9397005da78e2f233e534b8e23bb50ced17f6f https://github.com/atom/language-csharp/commit/15df1701985ce9cfcbd144d515bef377d0cb863e https://github.com/atom/language-csharp/commit/17f89b8e68cf2b44a9141512cea240689ad51190 (GitHub highlighter needs them)

Before

// Here used to be bad highlighting, but now 
// changes are merged and the code looks OK!
Span<int> arr = stackalloc [] {1, 2, 3};
static void M(in S arg);
public ref struct RefStruct { }

After

C# language syntax highlighting is improved and now supports ref struct, stackalloc, etc.

image

Possible Drawbacks

None.

worldbeater commented 6 years ago

You are welcome @damieng! And thank you for reviewing this :1st_place_medal: