Пример #1
0
        private ExpressionSyntax ParseEquality()
        {
            var left = this.ParseLogicalNot();

            while (
                this.CurrentToken.Kind == SyntaxKind.EqualsEqualsToken ||
                this.CurrentToken.Kind == SyntaxKind.ExclamationEqualsToken
                )
            {
                var op    = this.EatToken();
                var right = this.ParseEquality();
                left = SyntaxFactory.BinaryExpression(
                    SyntaxFacts.GetBinaryExpression(op.Kind),
                    left,
                    op,
                    right
                    );
            }

            return(left);
        }