Ejemplo n.º 1
0
 private DirectiveTriviaSyntax ParseIfDirective(SyntaxToken hash, SyntaxToken keyword, bool isActive)
 {
     var expr = this.ParseExpression();
     var eod = this.ParseEndOfDirective(ignoreErrors: false);
     var isTrue = this.EvaluateBool(expr);
     var branchTaken = isActive && isTrue;
     return SyntaxFactory.IfDirectiveTrivia(hash, keyword, expr, eod, isActive, branchTaken, isTrue);
 }