internal SyntaxList <ArrayRankSpecifierSyntax> ConvertArrayRankSpecifierSyntaxes( SyntaxList <VBSyntax.ArrayRankSpecifierSyntax> arrayRankSpecifierSyntaxs, ArgumentListSyntax nodeArrayBounds, bool withSizes = true) { var bounds = SyntaxFactory.List(arrayRankSpecifierSyntaxs.Select(r => (ArrayRankSpecifierSyntax)r.Accept(_nodesVisitor))); if (nodeArrayBounds != null) { var sizesSpecified = nodeArrayBounds.Arguments.Any(a => !a.IsOmitted); var rank = nodeArrayBounds.Arguments.Count; if (!sizesSpecified) { rank += 1; } var convertedArrayBounds = withSizes && sizesSpecified?ConvertArrayBounds(nodeArrayBounds) : Enumerable.Repeat(SyntaxFactory.OmittedArraySizeExpression(), rank); var arrayRankSpecifierSyntax = SyntaxFactory.ArrayRankSpecifier( SyntaxFactory.SeparatedList( convertedArrayBounds)); bounds = bounds.Insert(0, arrayRankSpecifierSyntax); } return(bounds); }
public IEnumerable <ExpressionSyntax> ConvertArrayBounds(ArgumentListSyntax argumentListSyntax) { return(argumentListSyntax.Arguments.Select(a => { VBSyntax.ExpressionSyntax upperBoundExpression = a is SimpleArgumentSyntax sas ? sas.Expression : a is RangeArgumentSyntax ras ? ras.UpperBound : throw new ArgumentOutOfRangeException(nameof(a), a, null); return IncreaseArrayUpperBoundExpression(upperBoundExpression); })); }
public static IEnumerable <ExpressionSyntax> ConvertArrayBounds(VBSyntax.ArgumentListSyntax argumentListSyntax, SemanticModel model, VBasic.VisualBasicSyntaxVisitor <CSharpSyntaxNode> commentConvertingNodesVisitor) { return(argumentListSyntax.Arguments.Select(a => IncreaseArrayUpperBoundExpression(((VBSyntax.SimpleArgumentSyntax)a).Expression, model, commentConvertingNodesVisitor))); }
public IEnumerable <ExpressionSyntax> ConvertArrayBounds(ArgumentListSyntax argumentListSyntax) { return(argumentListSyntax.Arguments.Select(a => IncreaseArrayUpperBoundExpression(((SimpleArgumentSyntax)a).Expression))); }
public virtual void VisitInvocationAndCreation(VBSyntax.ExpressionSyntax node, VBSyntax.ArgumentListSyntax argList, ExecutionState state, Configuration projectConfiguration) { }