From 9260faf3afcd03623fa9efa4fdc0a20b7e273915 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 29 Feb 2016 21:46:30 -0500 Subject: [PATCH] Update the fixtures. --- test/diffs/dictionary.json.js | 2 +- test/diffs/newline-at-eof.json.js | 2 +- test/diffs/no-newline-at-eof.json.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/diffs/dictionary.json.js b/test/diffs/dictionary.json.js index cbaeac526..746932d9e 100644 --- a/test/diffs/dictionary.json.js +++ b/test/diffs/dictionary.json.js @@ -1 +1 @@ -[[{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":0,"end":2}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":0,"end":2}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":0,"end":2}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":0,"end":2}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":0,"end":2}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":0,"end":2}}}}]}},{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[["\"b\"",{"tag":"Free","contents":{"getSyntax":{"tag":"Fixed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":4,"end":5}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"b"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":5,"end":6}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":6,"end":7}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":4,"end":7}}}},{"tag":"Pure","contents":{"tag":"SplitReplace","contents":[{"categories":["number"],"characterRange":{"start":9,"end":10}},{"tag":"Leaf","contents":"4"}]}}]},"getAnnotation":{"categories":["Pair"],"characterRange":{"start":4,"end":10}}}}]]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":2,"end":12}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":2,"end":12}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":2,"end":12}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[["\"b\"",{"tag":"Free","contents":{"getSyntax":{"tag":"Fixed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":4,"end":5}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"b"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":5,"end":6}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":6,"end":7}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":4,"end":7}}}},{"tag":"Pure","contents":{"tag":"SplitReplace","contents":[{"categories":["number"],"characterRange":{"start":9,"end":10}},{"tag":"Leaf","contents":"5"}]}}]},"getAnnotation":{"categories":["Pair"],"characterRange":{"start":4,"end":10}}}}]]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":2,"end":12}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":2,"end":12}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":2,"end":12}}}}]}},{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[["\"a\"",{"tag":"Free","contents":{"getSyntax":{"tag":"Fixed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":14,"end":15}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"a"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":15,"end":16}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":16,"end":17}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":14,"end":17}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"5"},"getAnnotation":{"categories":["number"],"characterRange":{"start":19,"end":20}}}}]},"getAnnotation":{"categories":["Pair"],"characterRange":{"start":14,"end":20}}}}]]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":12,"end":21}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":12,"end":21}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":12,"end":21}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[["\"a\"",{"tag":"Free","contents":{"getSyntax":{"tag":"Fixed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":14,"end":15}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"a"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":15,"end":16}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":16,"end":17}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":14,"end":17}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"5"},"getAnnotation":{"categories":["number"],"characterRange":{"start":19,"end":20}}}}]},"getAnnotation":{"categories":["Pair"],"characterRange":{"start":14,"end":20}}}}]]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":12,"end":21}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":12,"end":21}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":12,"end":21}}}}]}},{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":21,"end":22}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":21,"end":23}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":21,"end":23}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Keyed","contents":{"toList":[]}},"getAnnotation":{"categories":["DictionaryLiteral"],"characterRange":{"start":21,"end":22}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":21,"end":23}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":21,"end":23}}}}]}},{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":23,"end":23}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":23,"end":23}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":23,"end":23}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":23,"end":23}}}}]}}],[{"start":0,"end":23},{"start":0,"end":23}]] \ No newline at end of file +[{"left":[{"categories":["program"],"range":[0,2],"syntax":{"children":[{"categories":["expression_statement"],"range":[0,2],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[0,2],"syntax":{"children":{},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}],"right":[{"categories":["program"],"range":[0,2],"syntax":{"children":[{"categories":["expression_statement"],"range":[0,2],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[0,2],"syntax":{"children":{},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}]},{"left":[{"categories":["program"],"range":[2,12],"syntax":{"children":[{"categories":["expression_statement"],"range":[2,12],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[2,12],"syntax":{"children":{"\"b\"":{"categories":["Pair"],"range":[4,10],"syntax":{"children":[{"categories":["StringLiteral"],"range":[4,7],"syntax":{"children":[{"categories":["StringLiteral"],"range":[4,5],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[5,6],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[6,7],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"replace":{"categories":["number"],"range":[9,10],"syntax":{"type":"leaf"}}}],"type":"fixed"}}},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}],"right":[{"categories":["program"],"range":[2,12],"syntax":{"children":[{"categories":["expression_statement"],"range":[2,12],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[2,12],"syntax":{"children":{"\"b\"":{"categories":["Pair"],"range":[4,10],"syntax":{"children":[{"categories":["StringLiteral"],"range":[4,7],"syntax":{"children":[{"categories":["StringLiteral"],"range":[4,5],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[5,6],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[6,7],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"replace":{"categories":["number"],"range":[9,10],"syntax":{"type":"leaf"}}}],"type":"fixed"}}},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}]},{"left":[{"categories":["program"],"range":[12,21],"syntax":{"children":[{"categories":["expression_statement"],"range":[12,21],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[12,21],"syntax":{"children":{"\"a\"":{"categories":["Pair"],"range":[14,20],"syntax":{"children":[{"categories":["StringLiteral"],"range":[14,17],"syntax":{"children":[{"categories":["StringLiteral"],"range":[14,15],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[15,16],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[16,17],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["number"],"range":[19,20],"syntax":{"type":"leaf"}}],"type":"fixed"}}},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}],"right":[{"categories":["program"],"range":[12,21],"syntax":{"children":[{"categories":["expression_statement"],"range":[12,21],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[12,21],"syntax":{"children":{"\"a\"":{"categories":["Pair"],"range":[14,20],"syntax":{"children":[{"categories":["StringLiteral"],"range":[14,17],"syntax":{"children":[{"categories":["StringLiteral"],"range":[14,15],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[15,16],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[16,17],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["number"],"range":[19,20],"syntax":{"type":"leaf"}}],"type":"fixed"}}},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}]},{"left":[{"categories":["program"],"range":[21,23],"syntax":{"children":[{"categories":["expression_statement"],"range":[21,23],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[21,22],"syntax":{"children":{},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}],"right":[{"categories":["program"],"range":[21,23],"syntax":{"children":[{"categories":["expression_statement"],"range":[21,23],"syntax":{"children":[{"categories":["DictionaryLiteral"],"range":[21,22],"syntax":{"children":{},"type":"fixed"}}],"type":"indexed"}}],"type":"indexed"}}]},{"left":[{"categories":["program"],"range":[23,23],"syntax":{"children":[{"categories":["expression_statement"],"range":[23,23],"syntax":{"children":[],"type":"indexed"}}],"type":"indexed"}}],"right":[{"categories":["program"],"range":[23,23],"syntax":{"children":[{"categories":["expression_statement"],"range":[23,23],"syntax":{"children":[],"type":"indexed"}}],"type":"indexed"}}]}] \ No newline at end of file diff --git a/test/diffs/newline-at-eof.json.js b/test/diffs/newline-at-eof.json.js index 5dfcd335e..81c1b5c01 100644 --- a/test/diffs/newline-at-eof.json.js +++ b/test/diffs/newline-at-eof.json.js @@ -1 +1 @@ -[[{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"console"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":0,"end":7}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"log"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":8,"end":11}}}}]},"getAnnotation":{"categories":["member_access"],"characterRange":{"start":0,"end":11}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":13}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"hello"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":13,"end":18}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":","},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":18,"end":19}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"world"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":20,"end":25}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":25,"end":26}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["arguments"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["FunctionCall"],"characterRange":{"start":0,"end":27}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":0,"end":28}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":0,"end":29}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"console"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":0,"end":7}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"log"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":8,"end":11}}}}]},"getAnnotation":{"categories":["member_access"],"characterRange":{"start":0,"end":11}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":13}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"hello"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":13,"end":18}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":","},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":18,"end":19}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"world"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":20,"end":25}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":25,"end":26}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["arguments"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["FunctionCall"],"characterRange":{"start":0,"end":27}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":0,"end":28}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":0,"end":29}}}}]}},{"unLeft":{"tag":"EmptyLine","contents":[]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[]},"getAnnotation":{"categories":["program"],"characterRange":{"start":29,"end":30}}}}]}},{"unLeft":{"tag":"EmptyLine","contents":[]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Pure","contents":{"tag":"SplitInsert","contents":[{"categories":["expression_statement"],"characterRange":{"start":30,"end":55}},{"tag":"Indexed","contents":[[{"categories":["FunctionCall"],"characterRange":{"start":30,"end":54}},{"tag":"Indexed","contents":[[{"categories":["member_access"],"characterRange":{"start":30,"end":41}},{"tag":"Indexed","contents":[[{"categories":["identifier"],"characterRange":{"start":30,"end":37}},{"tag":"Leaf","contents":"console"}],[{"categories":["identifier"],"characterRange":{"start":38,"end":41}},{"tag":"Leaf","contents":"log"}]]}],[{"categories":["arguments"],"characterRange":{"start":42,"end":53}},{"tag":"Indexed","contents":[[{"categories":["StringLiteral"],"characterRange":{"start":42,"end":53}},{"tag":"Indexed","contents":[[{"categories":["StringLiteral"],"characterRange":{"start":42,"end":43}},{"tag":"Leaf","contents":"\""}],[{"categories":["StringLiteral"],"characterRange":{"start":43,"end":52}},{"tag":"Leaf","contents":"insertion"}],[{"categories":["StringLiteral"],"characterRange":{"start":52,"end":53}},{"tag":"Leaf","contents":"\""}]]}]]}]]}]]}]}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":30,"end":56}}}}]}},{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[]},"getAnnotation":{"categories":["program"],"characterRange":{"start":29,"end":29}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[]},"getAnnotation":{"categories":["program"],"characterRange":{"start":56,"end":56}}}}]}}],[{"start":0,"end":29},{"start":0,"end":56}]] \ No newline at end of file +[{"left":[{"categories":["program"],"range":[0,29],"syntax":{"children":[{"categories":["expression_statement"],"range":[0,28],"syntax":{"children":[{"categories":["FunctionCall"],"range":[0,27],"syntax":{"children":[{"categories":["member_access"],"range":[0,11],"syntax":{"children":[{"categories":["identifier"],"range":[0,7],"syntax":{"type":"leaf"}},{"categories":["identifier"],"range":[8,11],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["arguments"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,13],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[13,18],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[18,19],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[20,25],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[25,26],"syntax":{"type":"leaf"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"right":[{"categories":["program"],"range":[0,29],"syntax":{"children":[{"categories":["expression_statement"],"range":[0,28],"syntax":{"children":[{"categories":["FunctionCall"],"range":[0,27],"syntax":{"children":[{"categories":["member_access"],"range":[0,11],"syntax":{"children":[{"categories":["identifier"],"range":[0,7],"syntax":{"type":"leaf"}},{"categories":["identifier"],"range":[8,11],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["arguments"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,13],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[13,18],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[18,19],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[20,25],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[25,26],"syntax":{"type":"leaf"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}]},{"left":[],"right":[{"categories":["program"],"range":[29,30],"syntax":{"children":[],"type":"indexed"}}]},{"left":[],"right":[{"categories":["program"],"range":[30,56],"syntax":{"children":[{"insert":{"categories":["expression_statement"],"range":[30,55],"syntax":{"children":[{"categories":["FunctionCall"],"range":[30,54],"syntax":{"children":[{"categories":["member_access"],"range":[30,41],"syntax":{"children":[{"categories":["identifier"],"range":[30,37],"syntax":{"type":"leaf"}},{"categories":["identifier"],"range":[38,41],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["arguments"],"range":[42,53],"syntax":{"children":[{"categories":["StringLiteral"],"range":[42,53],"syntax":{"children":[{"categories":["StringLiteral"],"range":[42,43],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[43,52],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[52,53],"syntax":{"type":"leaf"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}}],"type":"indexed"}}]},{"left":[{"categories":["program"],"range":[29,29],"syntax":{"children":[],"type":"indexed"}}],"right":[{"categories":["program"],"range":[56,56],"syntax":{"children":[],"type":"indexed"}}]}] \ No newline at end of file diff --git a/test/diffs/no-newline-at-eof.json.js b/test/diffs/no-newline-at-eof.json.js index 71257739a..cbd40a8fc 100644 --- a/test/diffs/no-newline-at-eof.json.js +++ b/test/diffs/no-newline-at-eof.json.js @@ -1 +1 @@ -[[{"unLeft":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"console"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":0,"end":7}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"log"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":8,"end":11}}}}]},"getAnnotation":{"categories":["member_access"],"characterRange":{"start":0,"end":11}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":13}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"hello"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":13,"end":18}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":","},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":18,"end":19}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"world"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":20,"end":25}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":25,"end":26}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["arguments"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["FunctionCall"],"characterRange":{"start":0,"end":27}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":0,"end":28}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":0,"end":28}}}}]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"console"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":0,"end":7}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"log"},"getAnnotation":{"categories":["identifier"],"characterRange":{"start":8,"end":11}}}}]},"getAnnotation":{"categories":["member_access"],"characterRange":{"start":0,"end":11}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":13}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"hello"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":13,"end":18}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":","},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":18,"end":19}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"world"},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":20,"end":25}}}},{"tag":"Free","contents":{"getSyntax":{"tag":"Leaf","contents":"\""},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":25,"end":26}}}}]},"getAnnotation":{"categories":["StringLiteral"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["arguments"],"characterRange":{"start":12,"end":26}}}}]},"getAnnotation":{"categories":["FunctionCall"],"characterRange":{"start":0,"end":27}}}}]},"getAnnotation":{"categories":["expression_statement"],"characterRange":{"start":0,"end":28}}}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":0,"end":29}}}}]}},{"unLeft":{"tag":"EmptyLine","contents":[]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[]},"getAnnotation":{"categories":["program"],"characterRange":{"start":29,"end":30}}}}]}},{"unLeft":{"tag":"EmptyLine","contents":[]},"unRight":{"tag":"Line","contents":[{"tag":"Free","contents":{"getSyntax":{"tag":"Indexed","contents":[{"tag":"Pure","contents":{"tag":"SplitInsert","contents":[{"categories":["expression_statement"],"characterRange":{"start":30,"end":55}},{"tag":"Indexed","contents":[[{"categories":["FunctionCall"],"characterRange":{"start":30,"end":54}},{"tag":"Indexed","contents":[[{"categories":["member_access"],"characterRange":{"start":30,"end":41}},{"tag":"Indexed","contents":[[{"categories":["identifier"],"characterRange":{"start":30,"end":37}},{"tag":"Leaf","contents":"console"}],[{"categories":["identifier"],"characterRange":{"start":38,"end":41}},{"tag":"Leaf","contents":"log"}]]}],[{"categories":["arguments"],"characterRange":{"start":42,"end":53}},{"tag":"Indexed","contents":[[{"categories":["StringLiteral"],"characterRange":{"start":42,"end":53}},{"tag":"Indexed","contents":[[{"categories":["StringLiteral"],"characterRange":{"start":42,"end":43}},{"tag":"Leaf","contents":"\""}],[{"categories":["StringLiteral"],"characterRange":{"start":43,"end":52}},{"tag":"Leaf","contents":"insertion"}],[{"categories":["StringLiteral"],"characterRange":{"start":52,"end":53}},{"tag":"Leaf","contents":"\""}]]}]]}]]}]]}]}}]},"getAnnotation":{"categories":["program"],"characterRange":{"start":30,"end":55}}}}]}}],[{"start":0,"end":28},{"start":0,"end":55}]] \ No newline at end of file +[{"left":[{"categories":["program"],"range":[0,28],"syntax":{"children":[{"categories":["expression_statement"],"range":[0,28],"syntax":{"children":[{"categories":["FunctionCall"],"range":[0,27],"syntax":{"children":[{"categories":["member_access"],"range":[0,11],"syntax":{"children":[{"categories":["identifier"],"range":[0,7],"syntax":{"type":"leaf"}},{"categories":["identifier"],"range":[8,11],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["arguments"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,13],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[13,18],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[18,19],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[20,25],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[25,26],"syntax":{"type":"leaf"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"right":[{"categories":["program"],"range":[0,29],"syntax":{"children":[{"categories":["expression_statement"],"range":[0,28],"syntax":{"children":[{"categories":["FunctionCall"],"range":[0,27],"syntax":{"children":[{"categories":["member_access"],"range":[0,11],"syntax":{"children":[{"categories":["identifier"],"range":[0,7],"syntax":{"type":"leaf"}},{"categories":["identifier"],"range":[8,11],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["arguments"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,26],"syntax":{"children":[{"categories":["StringLiteral"],"range":[12,13],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[13,18],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[18,19],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[20,25],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[25,26],"syntax":{"type":"leaf"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}]},{"left":[],"right":[{"categories":["program"],"range":[29,30],"syntax":{"children":[],"type":"indexed"}}]},{"left":[],"right":[{"categories":["program"],"range":[30,55],"syntax":{"children":[{"insert":{"categories":["expression_statement"],"range":[30,55],"syntax":{"children":[{"categories":["FunctionCall"],"range":[30,54],"syntax":{"children":[{"categories":["member_access"],"range":[30,41],"syntax":{"children":[{"categories":["identifier"],"range":[30,37],"syntax":{"type":"leaf"}},{"categories":["identifier"],"range":[38,41],"syntax":{"type":"leaf"}}],"type":"indexed"}},{"categories":["arguments"],"range":[42,53],"syntax":{"children":[{"categories":["StringLiteral"],"range":[42,53],"syntax":{"children":[{"categories":["StringLiteral"],"range":[42,43],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[43,52],"syntax":{"type":"leaf"}},{"categories":["StringLiteral"],"range":[52,53],"syntax":{"type":"leaf"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}],"type":"indexed"}}}],"type":"indexed"}}]}] \ No newline at end of file