sdk/dotnet/src/Microsoft.Datasync.Client/Query/OData/ODataExpressionParser.cs
/// <summary>
/// Parses a function call expression.
/// </summary>
/// <param name="functionName">The name of the expression.</param>
/// <param name="errorPos">The start of the expression for error reporting.</param>
/// <returns>A <see cref="QueryNode"/> representing the expression.</returns>
Parses a function call expression.
Parses a function call expression .
private QueryNode ParseFunction(string functionName, int errorPos)
        {
            if (lexer.Token.Kind == QueryTokenKind.OpenParen)
            {
                if (functionName == "cast")
                {
                    return ParseTypeCoercion(errorPos);
                }
                else
                {
                    var args = ParseArgumentList();
                    ValidateFunction(functionName, args, errorPos);
                    return new FunctionCallNode(functionName, args);
                }
            }
            else
            {
                throw new ODataException("'(' expected.", lexer.Text, errorPos);
            }
        }
private QueryNode ParseFunction ( string functionName , int errorPos ) { if ( lexer . Token . Kind == QueryTokenKind . OpenParen ) { if ( functionName == " " ) { return ParseTypeCoercion ( errorPos ) ; } else { var args = ParseArgumentList ( ) ; ValidateFunction ( functionName , args , errorPos ) ; return new FunctionCallNode ( functionName , args ) ; } } else { throw new ODataException ( " " , lexer . Text , errorPos ) ; } }
Parses a function call expression.
Parses a function call expression .
A  representing the expression.
A representing the expression .
functionName
string
The name of the expression.
The name of the expression .
errorPos
int
The start of the expression for error reporting.
The start of the expression for error reporting .