Exemplo n.º 1
0
        internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, DiagnosticBag diagnostics)
        {
            switch (node.Kind())
            {
            case SyntaxKind.ArrowExpressionClause:
                return(binder.BindExpressionBodyAsBlock((ArrowExpressionClauseSyntax)node, diagnostics));

            case SyntaxKind.BaseConstructorInitializer:
            case SyntaxKind.ThisConstructorInitializer:
                return(binder.BindConstructorInitializer((ConstructorInitializerSyntax)node, diagnostics));

            case SyntaxKind.MethodDeclaration:
            case SyntaxKind.ConversionOperatorDeclaration:
            case SyntaxKind.OperatorDeclaration:
            case SyntaxKind.ConstructorDeclaration:
            case SyntaxKind.DestructorDeclaration:
            case SyntaxKind.GetAccessorDeclaration:
            case SyntaxKind.SetAccessorDeclaration:
            case SyntaxKind.AddAccessorDeclaration:
            case SyntaxKind.RemoveAccessorDeclaration:
                return(binder.BindMethodBody(node, diagnostics));
            }

            return(base.Bind(binder, node, diagnostics));
        }
Exemplo n.º 2
0
 internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, DiagnosticBag diagnostics)
 {
     if (node.Kind() == SyntaxKind.ArrowExpressionClause)
     {
         return binder.BindExpressionBodyAsBlock((ArrowExpressionClauseSyntax)node, diagnostics);
     }
     return base.Bind(binder, node, diagnostics);
 }
Exemplo n.º 3
0
 internal override BoundNode Bind(Binder binder, CSharpSyntaxNode node, DiagnosticBag diagnostics)
 {
     if (node.Kind() == SyntaxKind.ArrowExpressionClause)
     {
         return(binder.BindExpressionBodyAsBlock((ArrowExpressionClauseSyntax)node, diagnostics));
     }
     return(base.Bind(binder, node, diagnostics));
 }