private IfDefDirectiveTriviaSyntax ParseIfDefDirective(SyntaxToken hash, SyntaxToken keyword, bool isActive) { var name = Match(SyntaxKind.IdentifierToken); var eod = ParseEndOfDirective(false); var isTrue = _directiveStack.IsDefined(name.Text) == DefineState.Defined; var branchTaken = isActive && isTrue; return(new IfDefDirectiveTriviaSyntax( hash, keyword, name, eod, isActive, branchTaken, isTrue)); }