atom / language-csharp

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

Support for expression-bodied members in C# 6 #55

Closed jamesqo closed 7 years ago

jamesqo commented 8 years ago

Noticed this while updating the README of one of my own repos. This code does not highlight correctly:

public class MyCollection<T> : IEnumerable<T>
{
    private T[] array;

    public StructEnumerator<T> GetEnumerator() =>
        Enumerator.Struct(array);

    IEnumerator<T> IEnumerable<T>.GetEnumerator() =>
        Enumerator.Class(array); // avoid boxing of value types

    IEnumerator IEnumerable.GetEnumerator() =>
        this.GetEnumerator();
}

Not quite sure how to fix this, but I thought I'd just check in and let you guys know.

damieng commented 7 years ago

Fixed with 2d7b7286f566cd1c5ed1809be6efdea3e139796e