private static void AssertIsClosureScopeSyntax(CSharpSyntaxNode syntaxOpt) { // See C# specification, chapter 3.7 Scopes. // static lambdas technically have the class scope so the scope syntax is null if (syntaxOpt == null) { return; } if (SyntaxUtilities.IsClosureScope(syntaxOpt)) { return; } throw ExceptionUtilities.UnexpectedValue(syntaxOpt.Kind()); }
internal sealed override SyntaxNode GetCorrespondingLambdaBody(SyntaxNode body) { return(SyntaxUtilities.GetCorrespondingLambdaBody(body, this)); }