private static ConsList<Directive> GetPreviousIf(ConsList<Directive> directives)
{
var current = directives;
while (current != null && current.Any())
{
switch (current.Head.Kind)
{
case SyntaxKind.IfDirectiveTrivia:
case SyntaxKind.IfDefDirectiveTrivia:
case SyntaxKind.IfNDefDirectiveTrivia:
return current;
}
current = current.Tail;
}
return current;
}