atom / language-csharp

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

Support interpolated strings #49

Closed 50Wliu closed 7 years ago

50Wliu commented 8 years ago

Fixes #43

Note: I was not able to test this (yet). It probably doesn't even fix anything.

50Wliu commented 8 years ago

While this now works, it actually doesn't fix #43. The bigger issue is that lambdas are entirely unsupported, which I'm working on now.

lee-dohm commented 8 years ago

which I'm working on now.

Are you going to open a separate PR for the lambdas and this is ready to review now? (Sorry, just clarifying ... brain too full :grinning:)

50Wliu commented 8 years ago

Yeah, this is ready for review. Lambdas...might take a while. Trying to copy/paste over as much as I can from language-javascript but there's a lot to change :(.

lee-dohm commented 8 years ago

This looks ok to me but I haven't used C# in a few years and am not up to date on the new string interpolation stuff.

50Wliu commented 8 years ago

I just followed the spec: https://msdn.microsoft.com/en-us/library/dn961160.aspx?f=255&MSPPError=-2147217396. Hopefully that covers everything :laughing:.

shiftkey commented 8 years ago

@lee-dohm I can kick the tires on this PR over the weekend if you'd like a +1 on this

lee-dohm commented 8 years ago

I'd appreciate that @shiftkey :grinning:

shiftkey commented 8 years ago

For reference, this is an example:

Console.WriteLine($"Name = {name}, hours = {hours:hh}")
jamesqo commented 8 years ago

Any progress on this yet?

By the way, I hope you also take into consideration that string interpolation can be combined with verbatim literals, e.g.

string message = $@"{name} exclaimed ""Hello, world!""";