public override SyntaxList <StatementSyntax> DefaultVisit(SyntaxNode node) { // If we don't insert the new variables in the right place, don't insert them at all _additionalLocals.PopScope(); throw new NotImplementedException($"Conversion for {VBasic.VisualBasicExtensions.Kind(node)} not implemented, please report this issue") .WithNodeInformation(node); }
private async Task <SyntaxList <StatementSyntax> > AddLocalVariables(VBasic.VisualBasicSyntaxNode node) { _additionalLocals.PushScope(); IEnumerable <SyntaxNode> csNodes; List <StatementSyntax> additionalDeclarations; try { (csNodes, additionalDeclarations) = await CreateLocals(node); } finally { _additionalLocals.PopScope(); } return(SyntaxFactory.List(additionalDeclarations.Concat(csNodes))); }