public static void BridgeMethodCall(ParseInfo parseInfo, CallInfo callInfo, DocRange range, string name, bool fatal) => parseInfo.TranslateInfo.StagedInitiation.On(InitiationStage.PostContent, () => { // Collect the restricted calls. foreach (var restrictedCallType in CallInfoVisitor.CollectRestrictedCalls(callInfo)) { // Add the restricted call to the current CallInfo. parseInfo.RestrictedCallHandler.AddRestrictedCall(new RestrictedCall( restrictedCallType, parseInfo.GetLocation(range), RestrictedCall.Message_FunctionCallsRestricted(name, restrictedCallType), fatal )); } });
public static string Message_UnsetOptionalParameter(string parameterName, string functionName, RestrictedCallType type) => $"An unset optional parameter '{parameterName}' in the function '{functionName}' calls a restricted value of type '{RestrictedCall.StringFromCallType(type)}'.";
public static string Message_LambdaInvoke(string lambdaName, RestrictedCallType type) => $"The lambda '{lambdaName}' calls a restricted value of type '{RestrictedCall.StringFromCallType(type)}'.";
public static string Message_Macro(string macroName, RestrictedCallType type) => $"The macro '{macroName}' calls a restricted value of type '{RestrictedCall.StringFromCallType(type)}'.";
public static string Message_FunctionCallsRestricted(string functionName, RestrictedCallType type) => $"The function '{functionName}' calls a restricted value of type '{RestrictedCall.StringFromCallType(type)}'.";