mirror of
https://github.com/github/semantic.git
synced 2024-12-23 06:41:45 +03:00
2168 lines
97 KiB
JSON
2168 lines
97 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-subscript-access-assignment-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
12,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
12,
|
|
12
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"subscript-access-assignment.js",
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"6b6d48d2b046607da97eaaad0feb91195c3a2fea"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"sha1": "d0198df46c650454f3a881a6d7986a95080562ce",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "6fe6a7066cc9f20307dfc12c6c73cfa6400f4513"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-assignment-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
26,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
33,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
36
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
12,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
12,
|
|
12
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"subscript-access-assignment.js",
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"6b6d48d2b046607da97eaaad0feb91195c3a2fea",
|
|
"17d3ff486934142d4ecceba42205dd1fd7b01dd9"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"sha1": "6fe6a7066cc9f20307dfc12c6c73cfa6400f4513",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "6f5a7c7ef61c1a4365ba554fb2139099d8d28e39"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-assignment-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
26,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
33,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
36
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
26,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
33,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
36
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"subscript-access-assignment.js",
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"17d3ff486934142d4ecceba42205dd1fd7b01dd9",
|
|
"d856ac0dc8793e99d8c20158e150163e63098930"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"sha1": "6f5a7c7ef61c1a4365ba554fb2139099d8d28e39",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "7ba6b5c28bd6b490518f1a12107b4058454ec382"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-assignment-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
26,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
33,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
36
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
26,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
33,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
36
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"subscript-access-assignment.js",
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"d856ac0dc8793e99d8c20158e150163e63098930",
|
|
"17d3ff486934142d4ecceba42205dd1fd7b01dd9"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"sha1": "7ba6b5c28bd6b490518f1a12107b4058454ec382",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "2adc12607613425990d575eb5596be990a777cb0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-assignment-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
24,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
26,
|
|
29
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
33,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
24,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
36
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
24,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
24
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"subscript-access-assignment.js",
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"17d3ff486934142d4ecceba42205dd1fd7b01dd9",
|
|
"cdcb426e18effec10e46b2f6283a63e87b731e9a"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"sha1": "2adc12607613425990d575eb5596be990a777cb0",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "c3e20f7ea9afffda19dbb149d6e3a25a2eea4d10"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-assignment-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
12,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
14,
|
|
17
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
21,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
12,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
12,
|
|
24
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
24,
|
|
24
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
24,
|
|
24
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
12,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
12,
|
|
12
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"subscript-access-assignment.js",
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"cdcb426e18effec10e46b2f6283a63e87b731e9a",
|
|
"0407c3a1afe454d938eaf701c4617a93edf4bdff"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"sha1": "c3e20f7ea9afffda19dbb149d6e3a25a2eea4d10",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "6c5fde85b4bc28bb708cd20cf952a956c40f63fd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-assignment-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "SubscriptAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "StringLiteral",
|
|
"range": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
9,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
10
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
11
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
12
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
12,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
12,
|
|
12
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"subscript-access-assignment.js",
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"oids": [
|
|
"0407c3a1afe454d938eaf701c4617a93edf4bdff",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-assignment.js"
|
|
],
|
|
"sha1": "6c5fde85b4bc28bb708cd20cf952a956c40f63fd",
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"sha2": "9ddd4bfcc2cab682396ac44c7bcc451632d719ca"
|
|
}]
|