atom / language-csharp

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

Improve preprocessor and add specs #71

Closed damieng closed 8 years ago

damieng commented 8 years ago

This does a few things;

  1. Optimizes the preprocessor block to be a single matcher
  2. Removes the unused toc-list for regions
  3. Adds a new directive.preprocessor.cs that can be styled (e.g. the #if bit)
  4. Adds comprehensive test coverage for all preprocessor instructions with leading whitespace and trailing line comments in a variety of contexts
50Wliu commented 8 years ago

In language-c, the # is tokenized separately as punctuation.definition.directive.c and the entire keyword (#define, #if) as at the minimum punctuation.definition.directive.c.

damieng commented 8 years ago

I don't quite understand. Did you mean to put the same scope name twice?

damieng commented 8 years ago

Merging for now, will tweak this once we decide if we want to split the # out and what scopes to use.

50Wliu commented 8 years ago

Yeah, I meant keyword.control.directive.c for the second one... 🙈