dotnet / dotnet/csharp-tmLanguage

#else preprocessor directive loses colors with conditional operator

Open
#149 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
78
Forks
43
Avg merge
34m
Merged PRs (30d)
1

Description

Observed in GitHub and VSCode v1.30.2.

The colorization is lost after `: NotSupportedByX_ConditionUnmet();` line onwards.

```c#
class A
{
static bool B { get; } =
Condition
#if X
? SupportedByXOnly_ConditionMet()
: SupportedByXOnly_ConditionUnmet();
#else
? NotSupportedByX_ConditionMet()
: NotSupportedByX_ConditionUnmet();

[MyAttribute("Z")]
const int Y = 1;
#endif
}
```
![image](https://user-images.githubusercontent.com/3840695/53292009-c7665180-37c4-11e9-9af0-f98144ac0d70.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.