semantic parsing of "array of array"

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 17 years ago by Nik Verkhovtseff
Version: 4.0.0234
Avatar
Hi,

I'm designing my own semantic parser for C#.

Could you explain me how should I treat with variable type while "array of array" parsing:

int[][] a;
should it be something like this:

TypeReference typeRef = new TypeReference("System.Int32[][]", textRange);
Thanks,
Nik

Comments (3)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nik,

I believe for that scenario you would use the ArrayRank property of the TypeReference and set it to 2.


Actipro Software Support

Posted 17 years ago by Nik Verkhovtseff
Avatar
Thanks for reply.

Another questions.

1. In such a case:

int [,] b;
should I also set TypeReference.ArrayRank to 2 ?

2. In TestApplication, IntelliPrompt shows members for String class (the dot after element access expression). But I suppose there should be the Char members:

string s = "Hello";
s[0].
am I wrong?

Thanks,
Nik
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Nik,

1) I think that is what we are doing as well but it probably needs to be enhanced to be different.

2) Yes that is a bug where indexers aren't being recognized properly. We have that on the TODO list.


Actipro Software Support

The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.