public override VisualBasicSyntaxNode VisitArrayRankSpecifier(CSS.ArrayRankSpecifierSyntax node)
 {
     return(SyntaxFactory.ArrayRankSpecifier(
                SyntaxFactory.Token(SyntaxKind.OpenParenToken),
                SyntaxFactory.TokenList(Enumerable.Repeat(SyntaxFactory.Token(SyntaxKind.CommaToken), node.Rank - 1)),
                SyntaxFactory.Token(SyntaxKind.CloseParenToken)));
 }
            private IEnumerable<ITypeSymbol> InferTypeInArrayRankSpecifier(ArrayRankSpecifierSyntax arrayRankSpecifier, SyntaxToken? previousToken = null)
            {
                // If we have a token, and it's not the open bracket or one of the commas, then no
                // inference.
                if (previousToken == arrayRankSpecifier.CloseBracketToken)
                {
                    return SpecializedCollections.EmptyEnumerable<ITypeSymbol>();
                }

                return SpecializedCollections.SingletonEnumerable(this.Compilation.GetSpecialType(SpecialType.System_Int32));
            }
Exemple #3
0
 public override SyntaxNode VisitArrayRankSpecifier(ArrayRankSpecifierSyntax node)
 {
     if (node.Rank > 1)
     {
         this.AppendCompileIssue(node, IssueType.Error, IssueId.MultiDimensionArrayAccessNotSupport);
     }
     return node;
 }
        public ArrayRankSpecifierTranslation(ArrayRankSpecifierSyntax syntax,  SyntaxTranslation parent) : base(syntax, parent)
        {

            Sizes = syntax.Sizes.Get<ExpressionSyntax, ExpressionTranslation>(this);
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="node"></param>
 public override sealed void VisitArrayRankSpecifier(ArrayRankSpecifierSyntax node)
 {
     this.OnNodeVisited(node, this.type.IsInstanceOfType(node));
     base.VisitArrayRankSpecifier(node);
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="node"></param>
 public override sealed void VisitArrayRankSpecifier(ArrayRankSpecifierSyntax node)
 {
     this.OnNodeVisited(node);
     if (!this.traverseRootOnly) base.VisitArrayRankSpecifier(node);
 }