/// <summary> /// Check if a given function signature can be called with the given expressions as parameters /// </summary> /// <param name="expressionValidator"> /// The expression validator, which is used to determine if an expression can be passed /// into a parameter of a certain type. /// </param> /// <param name="functionSignature">The function signature of the functions your passing the parameter expressions to.</param> /// <param name="expressions">The expressions we want to test against this function signatures defined parameters.</param> /// <returns> /// A <see cref="LSLFunctionSignatureMatch"/> object containing information about how the parameters matched /// or did not match the call signature. /// </returns> public static LSLFunctionSignatureMatch TryMatch(ILSLFunctionSignature functionSignature, IReadOnlyGenericArray <ILSLReadOnlyExprNode> expressions, ILSLExpressionValidator expressionValidator) { return(TryMatch(functionSignature, expressions, (expressionValidator.ValidateFunctionParameter))); }
/// <summary> /// Find a matching overload from a list of function signatures, given the parameter expressions. return null if none /// is found. /// </summary> /// <typeparam name="T">The type of <see cref="LSLFunctionSignature"/> derived object to preform matching against.</typeparam> /// <param name="expressionValidator"> /// The expression validator, which is used to determine if an expression can be passed /// into a parameter of a certain type. /// </param> /// <param name="functionSignatures">The function signatures to search through.</param> /// <param name="expressionNodes">The expression nodes of the function parameters we want to pass and find an overload for.</param> /// <returns>A matching <see cref="LSLFunctionSignature" /> overload or null.</returns> public static LSLFunctionOverloadMatches <T> MatchOverloads <T>(IReadOnlyGenericArray <T> functionSignatures, IReadOnlyGenericArray <ILSLReadOnlyExprNode> expressionNodes, ILSLExpressionValidator expressionValidator) where T : class, ILSLFunctionSignature { return(MatchOverloads(functionSignatures, expressionNodes, (expressionValidator.ValidateFunctionParameter))); }