Java array initialization support
Closed this issue · 1 comments
KvanTTT commented
Parsing each of the following lines of java code
char[] a = new char[] {'a', 'b'};
char[] a = new char[1][2];
gives
"Right": {
"NodeType": "ObjectCreateExpression",
"Type": {
"NodeType": "TypeToken",
"TypeText": "char"
},
"Arguments": {
"NodeType": "ArgsNode",
"Collection": []
}
}
Parsing should give the following results:
- char[] a = new char[] {'a', 'b'};
"Right": {
"NodeType": "ArrayCreationExpression",
"Type": {
"NodeType": "TypeToken",
"TypeText": "char"
},
"Sizes": [
{
"NodeType": "IntLiteral",
"Value": 0
}
],
"Initializers": [
{
"NodeType": "StringLiteral",
"Text": "a"
},
{
"NodeType": "StringLiteral",
"Text": "b"
}
]
}
- char[] a = new char[1][2];
"Right": {
"NodeType": "ArrayCreationExpression",
"Type": {
"NodeType": "TypeToken",
"TypeText": "char"
},
"Sizes": [
{
"NodeType": "IntLiteral",
"Value": 1
},
{
"NodeType": "IntLiteral",
"Value": 2
}
]
}