private bool IsPossibleStatement()
{
var tk = Current.Kind;
switch (tk)
{
case SyntaxKind.BreakKeyword:
case SyntaxKind.ContinueKeyword:
case SyntaxKind.DiscardKeyword:
case SyntaxKind.DoKeyword:
case SyntaxKind.ForKeyword:
case SyntaxKind.IfKeyword:
case SyntaxKind.ReturnKeyword:
case SyntaxKind.SwitchKeyword:
case SyntaxKind.WhileKeyword:
case SyntaxKind.TypedefKeyword:
case SyntaxKind.OpenBraceToken:
case SyntaxKind.OpenBracketToken:
case SyntaxKind.SemiToken:
case SyntaxKind.IdentifierToken:
return true;
default:
return SyntaxFacts.IsDeclarationModifier(tk)
|| SyntaxFacts.IsPredefinedType(Current)
|| IsPossibleExpression();
}
}