Exemplo n.º 1
0
            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));
            }
Exemplo n.º 2
0
 private static IVariableInternal CreateParameter(
     IFunctionScopeInternal scope,
     string name) =>
 scope.AddParameter(name, null);