Class ArgumentMapping
Maps the arguments of a call to the parameters of the procedure it calls, and binds how each is passed (MS-VBAL §5.3.1.11).
public static class ArgumentMapping
- Inheritance
-
ArgumentMapping
- Inherited Members
Methods
Bind(ImmutableArray<VBParameterSymbol>, ImmutableArray<ExpressionNode>, Func<ExpressionNode, BoundNode?>, Func<ExpressionNode, VBType?>)
Binds how each parameter of a call is given its argument: one BoundArgument for each of parameters, in order.
public static ImmutableArray<BoundArgument>? Bind(ImmutableArray<VBParameterSymbol> parameters, ImmutableArray<ExpressionNode> arguments, Func<ExpressionNode, BoundNode?> nodeOf, Func<ExpressionNode, VBType?> declaredTypeOf)
Parameters
parametersImmutableArray<VBParameterSymbol>The parameters of the procedure - after its
Me, for a member called on an object.argumentsImmutableArray<ExpressionNode>The arguments of the call, as they are written.
nodeOfFunc<ExpressionNode, BoundNode>The bound node of an argument; null for one that is not bound, which is then bound late.
declaredTypeOfFunc<ExpressionNode, VBType>The declared type of an argument; null for one that has none, whose coercion is planned when it is made.
Returns
- ImmutableArray<BoundArgument>?
The bound arguments; null when the arguments do not map to the parameters - which the call reports when it is made.
Map(ImmutableArray<VBParameterSymbol>, ImmutableArray<ExpressionNode>)
Maps arguments, as they are written, to parameters: a positional argument to the parameter at its position, a
named one to the parameter of its name, and the trailing positional arguments to a ParamArray parameter, which is always satisfied.
public static ArgumentMap Map(ImmutableArray<VBParameterSymbol> parameters, ImmutableArray<ExpressionNode> arguments)
Parameters
parametersImmutableArray<VBParameterSymbol>The parameters of the procedure - after its
Me, for a member called on an object.argumentsImmutableArray<ExpressionNode>The arguments of the call.