Skip to content

Instantly share code, notes, and snippets.

@controlflow
Created October 24, 2016 12:39
Show Gist options
  • Save controlflow/9c836bee1c5f41d34e9b5e35be2e5e86 to your computer and use it in GitHub Desktop.
Save controlflow/9c836bee1c5f41d34e9b5e35be2e5e86 to your computer and use it in GitHub Desktop.
while (myLexer.TokenType == CSharpTokenType.DOT ||
myLexer.TokenType == CSharpTokenType.DOUBLE_COLON)
{
// ...
}
// =>
while (myLexer.TokenType is var tt && (tt == CSharpTokenType.DOT ||
tt == CSharpTokenType.DOUBLE_COLON))
{
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment