private static IVariableInternal CreateParameter(IFunctionScopeInternal scope, ParameterSyntax parameter) { var name = parameter.Kind() switch { SyntaxKind.NamedParameter => ((NamedParameterSyntax)parameter).Name, SyntaxKind.VarArgParameter => "...", _ => throw new InvalidOperationException($"{parameter.Kind()} is not a known parameter kind.") }; return(scope.AddParameter(name, parameter)); }
private static IVariableInternal CreateParameter( IFunctionScopeInternal scope, string name) => scope.AddParameter(name, null);