Ejemplo n.º 1
0
        private static Tuple <LispInvocationArgument, LispObject>[] MatchArguments(IEnumerable <LispRegularInvocationArgument> regularArguments, IEnumerable <LispOptionalInvocationArgument> optionalArguments, IEnumerable <LispKeywordInvocationArgument> keywordArguments, IEnumerable <LispAuxiliaryInvocationArgument> auxiliaryArguments, LispRestInvocationArgument restArgument, LispObject[] argumentValues)
        {
            var argumentCollection = new LispArgumentCollection(regularArguments, optionalArguments, keywordArguments, auxiliaryArguments, restArgument);

            Assert.True(argumentCollection.TryMatchInvocationArguments(argumentValues, out var matchedArguments, out var error), $"Error when matching arguments: [{error?.Message}]");
            return(matchedArguments);
        }
Ejemplo n.º 2
0
 private static LispArgumentCollection GetArgumentCollection(params LispObject[] argumentTypeValues)
 {
     Assert.True(LispArgumentCollection.TryBuildArgumentCollection(argumentTypeValues, out var argumentCollection, out var error), $"Error when building arguments: [{error?.Message}]");
     return(argumentCollection);
 }