1
1
mirror of https://github.com/github/semantic.git synced 2024-12-19 12:51:52 +03:00
semantic/test/fixtures/cli/diff-tree.json

190 lines
5.2 KiB
JSON
Raw Normal View History

2018-06-06 20:02:44 +03:00
{
2018-06-20 19:14:45 +03:00
"diffs": [{
"diff": {
"merge": {
2018-06-06 20:02:44 +03:00
"term": "Statements",
2018-06-20 19:14:45 +03:00
"statements": [{
"merge": {
2018-06-06 20:02:44 +03:00
"term": "Method",
2019-01-19 05:21:36 +03:00
"methodAccessControl":{
"merge":{
"term":"Public",
2019-01-19 05:21:36 +03:00
"before":{
"sourceRange":[
0,
3
],
"sourceSpan":{
"start":[
1,
1
],
"end":[
1,
4
]
}
},
"after":{
"sourceRange":[
0,
3
],
"sourceSpan":{
"start":[
1,
1
],
"end":[
1,
4
]
}
}
}
},
2018-06-20 19:14:45 +03:00
"methodBody": {
"merge": {
"children": [{
"patch": {
"insert": {
2018-06-06 20:02:44 +03:00
"term": "Send",
"sourceRange": [13, 16],
"sendReceiver": null,
"sendBlock": null,
"sendArgs": [],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [2, 3],
"end": [2, 6]
},
2018-06-20 19:14:45 +03:00
"sendSelector": {
"patch": {
"insert": {
2018-06-06 20:02:44 +03:00
"term": "Identifier",
"name": "baz",
"sourceRange": [13, 16],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [2, 3],
"end": [2, 6]
}
}
}
}
}
}
}],
2018-06-20 19:14:45 +03:00
"before": {
2018-06-06 20:02:44 +03:00
"sourceRange": [8, 11],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [2, 1],
"end": [2, 4]
}
},
2018-06-20 19:14:45 +03:00
"after": {
2018-06-06 20:02:44 +03:00
"sourceRange": [13, 16],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [2, 3],
"end": [2, 6]
}
}
}
},
"methodContext": [],
2018-06-20 19:14:45 +03:00
"methodName": {
"patch": {
"replace": [{
2018-06-06 20:02:44 +03:00
"term": "Identifier",
"name": "foo",
"sourceRange": [4, 7],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 5],
"end": [1, 8]
}
2018-06-20 19:14:45 +03:00
}, {
2018-06-06 20:02:44 +03:00
"term": "Identifier",
"name": "bar",
"sourceRange": [4, 7],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 5],
"end": [1, 8]
}
}]
}
},
2018-06-20 19:14:45 +03:00
"methodParameters": [{
"patch": {
"insert": {
2018-06-06 20:02:44 +03:00
"term": "Identifier",
"name": "a",
"sourceRange": [8, 9],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 9],
"end": [1, 10]
}
}
}
}],
2018-06-20 19:14:45 +03:00
"methodReceiver": {
"merge": {
2018-06-06 20:02:44 +03:00
"term": "Empty",
2018-06-20 19:14:45 +03:00
"before": {
2018-06-06 20:02:44 +03:00
"sourceRange": [0, 0],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 1],
"end": [1, 1]
}
},
2018-06-20 19:14:45 +03:00
"after": {
2018-06-06 20:02:44 +03:00
"sourceRange": [0, 0],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 1],
"end": [1, 1]
}
}
}
},
2018-06-20 19:14:45 +03:00
"before": {
2018-06-06 20:02:44 +03:00
"sourceRange": [0, 11],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 1],
"end": [2, 4]
}
},
2018-06-20 19:14:45 +03:00
"after": {
2018-06-06 20:02:44 +03:00
"sourceRange": [0, 20],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 1],
"end": [3, 4]
}
}
}
}],
2018-06-20 19:14:45 +03:00
"before": {
2018-06-06 20:02:44 +03:00
"sourceRange": [0, 12],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 1],
"end": [3, 1]
}
},
2018-06-20 19:14:45 +03:00
"after": {
2018-06-06 20:02:44 +03:00
"sourceRange": [0, 21],
2018-06-20 19:14:45 +03:00
"sourceSpan": {
2018-06-06 20:02:44 +03:00
"start": [1, 1],
"end": [4, 1]
}
}
}
},
2018-06-20 19:14:45 +03:00
"stat": {
"path": "test/fixtures/ruby/corpus/method-declaration.A.rb->test/fixtures/ruby/corpus/method-declaration.B.rb",
"replace": [{
2018-06-06 20:02:44 +03:00
"path": "test/fixtures/ruby/corpus/method-declaration.A.rb",
"language": "Ruby"
2018-06-20 19:14:45 +03:00
}, {
2018-06-06 20:02:44 +03:00
"path": "test/fixtures/ruby/corpus/method-declaration.B.rb",
"language": "Ruby"
}]
}
}]
2019-01-19 05:21:36 +03:00
}