public static FindFunctionDefinitionByName ( this scope, string name, int position ) : IVariable | ||
scope | this | |
name | string | |
position | int | |
return | IVariable |
public static IVariable FindFunctionDefinitionByName(this IScope scope, string name, int position) {
var variables = scope.GetApplicableVariables(position);
var v = variables.FirstOrDefault(x =>
(x.Value is RFunction) && x.Name.EqualsOrdinal(name));
return v;
}