Skip to content

Instantly share code, notes, and snippets.

@controlflow
Created October 24, 2016 00:11
Show Gist options
  • Save controlflow/cba9152e5cc8cc2faa141062c78a5d83 to your computer and use it in GitHub Desktop.
Save controlflow/cba9152e5cc8cc2faa141062c78a5d83 to your computer and use it in GitHub Desktop.
var typeArgumentListScanKind = ScanTypeArgumentList(nameOptions);
if (typeArgumentListScanKind == ScanTypeArgumentListKind.DefiniteTypeArgumentList) return true;
if (typeArgumentListScanKind == ScanTypeArgumentListKind.PossibleTypeArgumentList)
{
if ((nameOptions & NameOptions.InTypeList) != 0)
{
return true;
}
}
return false;
// =>
var typeArgumentListScanKind = ScanTypeArgumentList(nameOptions);
switch (typeArgumentListScanKind)
{
case ScanTypeArgumentListKind.DefiniteTypeArgumentList:
case ScanTypeArgumentListKind.PossibleTypeArgumentList when (nameOptions & NameOptions.InTypeList) != 0:
return true;
default:
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment