Missing comma node during ArrayInitializerExpression parsing in Dictionary initialization #498

Open
opened 2015-07-05 07:03:29 -05:00 by KvanTTT · 0 comments
KvanTTT commented 2015-07-05 07:03:29 -05:00 (Migrated from github.com)

I parsed the following code:

int[] dict = new int[] { 3, 5 };

And got the following Node:

ArrayInitializerExpression: CSharpTokenNode ({) Expression (3) CSharpTokenNode (,) Expression (5) CSharpTokenNode (})

But when I parse the following code:

Dictionary<int, int> dict = new Dictionary<int, int>() { { 3, 5 } };

I get the following Node:

ArrayInitializerExpression: CSharpTokenNode ({) Expression (3) Expression (5) CSharpTokenNode (})

I parsed the following code: ``` CSharp int[] dict = new int[] { 3, 5 }; ``` And got the following Node: ArrayInitializerExpression: CSharpTokenNode ({) Expression (3) **CSharpTokenNode (,)** Expression (5) CSharpTokenNode (}) But when I parse the following code: ``` CSharp Dictionary<int, int> dict = new Dictionary<int, int>() { { 3, 5 } }; ``` I get the following Node: ArrayInitializerExpression: CSharpTokenNode ({) Expression (3) Expression (5) CSharpTokenNode (})
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/NRefactory#498
No description provided.