예제 #1
0
            static void WalkAndExpression(IndentedTextWriter writer, AndQuerySyntax node)
            {
                writer.WriteLine("AND");

                writer.Indent++;
                Walk(writer, node.Left);
                Walk(writer, node.Right);
                writer.Indent--;
            }
            private QuerySyntax ParseAndExpression()
            {
                var result = ParsePrimaryExpression();

                while (Current.Kind != QuerySyntaxKind.EndOfFile &&
                       Current.Kind != QuerySyntaxKind.OrKeyword &&
                       Current.Kind != QuerySyntaxKind.CloseParenthesisToken)
                {
                    var term = ParsePrimaryExpression();
                    result = new AndQuerySyntax(result, term);
                }

                return(result);
            }