1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00
Commit Graph

6279 Commits

Author SHA1 Message Date
Rob Rix
24f98f7db9 Test that symmetrical nodes force alignment on both sides. 2016-05-19 00:19:08 -04:00
Rob Rix
17403fc2b2 Fix up the test of symmetrical nodes and following asymmetrical ones. 2016-05-19 00:18:49 -04:00
Rob Rix
b86ce458b0 Test that symmetrical nodes force alignment of later asymmetrical nodes on the same line. 2016-05-19 00:15:03 -04:00
Rob Rix
7d591e737f Test that symmetrical nodes force alignment of earlier asymmetrical nodes on the same line. 2016-05-19 00:13:49 -04:00
Rob Rix
5c2d9b6b01 Change a test name. 2016-05-19 00:13:26 -04:00
Rob Rix
264f1cf5bd Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly 2016-05-18 18:21:40 -04:00
Rob Rix
dc8d0d4fdf Add punctuation characters to a test case to clarify the failure. 2016-05-18 17:22:16 -04:00
Rob Rix
99d0496d72 Use first/second to advance asymmetrically before symmetrical children. 2016-05-18 17:22:02 -04:00
Rob Rix
78323c8183 Swap the order of the arguments to alignChildren. 2016-05-18 16:19:40 -04:00
Rob Rix
59ca7fd08b Fix a missing bracket in a comment.
This was making bracket-matcher sad.
2016-05-18 16:15:44 -04:00
Rob Rix
a92f55a053 alignChildren returns the remaining children in the nonintersecting case. 2016-05-18 16:06:15 -04:00
Rob Rix
bb38c87015 Reformat alignChildren’s cases. 2016-05-18 16:03:37 -04:00
Rob Rix
a5960a164f Factor the recursive call of alignChildren into its where clause. 2016-05-18 16:02:38 -04:00
Rob Rix
59ff6fcccd Handle an oxymoronic case to silence a warning (and in hope of future refactoring). 2016-05-18 15:57:32 -04:00
Rob Rix
6ce445068c Move the symmetrical child test up a level.
This avoids redundancy with the does-anything-intersect-on-both-sides
case.
2016-05-18 15:51:49 -04:00
Rob Rix
5e1d111cac Move the asymmetrical computation break into the where clause. 2016-05-18 15:44:04 -04:00
Rob Rix
43a893e843 lineAndRemainingWhere doesn’t imply any. 2016-05-18 15:37:28 -04:00
Rob Rix
4592bb89e9 Move the supporting everything-is-asymmetrical definitions to the relevant case. 2016-05-18 15:28:47 -04:00
Rob Rix
95262b5eba These aren’t documentation comments. 2016-05-18 14:55:31 -04:00
Rob Rix
39dfeab8e7 Take lines one at a time before asymmetrically-intersecting symmetrical children. 2016-05-18 13:00:39 -04:00
Rob Rix
2b6ff86e7e Merge pull request #559 from github/weekly-2016-05-16
Add notes from our inaugural weekly meeting.
2016-05-18 10:40:36 -04:00
Rob Rix
1eac6d1302 We can simplify the symmetry test to isThese. 2016-05-18 09:55:52 -04:00
Rob Rix
7f59121565 Merge branch 'master' into cofree-and-bifunctors-sitting-in-a-tree-a-l-i-g-n-edly 2016-05-18 09:52:20 -04:00
Josh Vera
3b7f6194ea Merge branch 'master' into weekly-2016-05-16 2016-05-18 09:16:06 -04:00
Rob Rix
feef0e46b9 intersects returns its result in the union of the shapes of ranges and line, not in the intersection of their shapes. 2016-05-17 16:41:01 -04:00
Rob Rix
249c417ba8 Only return lines when we have asymmetrical children on that side. 2016-05-17 16:39:15 -04:00
Rob Rix
e7e948e684 Add a wrapper for lineAndRemaining which takes a predicate. 2016-05-17 16:38:49 -04:00
Rob Rix
8c55ba57c6 The non-overlapping intersection case has the same shape as the ranges, not as the line. 2016-05-17 15:57:23 -04:00
Rob Rix
eeab8580ff < != > 2016-05-17 15:57:18 -04:00
Rob Rix
0b45e06c91 Implement intersectsRange in terms of intersectionRange (i.e. correctly). 2016-05-17 15:31:46 -04:00
Rob Rix
d4618e486c Compute the intersection of two ranges. 2016-05-17 15:20:51 -04:00
Rob Rix
7cfdeff5e5 Intersections with empty children have the same shape as the ranges. 2016-05-17 15:04:09 -04:00
Rob Rix
b09abb7f10 Extract getRange to the top level. 2016-05-17 12:22:21 -04:00
Rob Rix
11bbde744a Fix a shadowing error.
So maybe I shouldn’t be so comfortable with shadowing after all.
2016-05-17 12:18:47 -04:00
Rob Rix
5f481de057 Rename symmetricalChildren (since only the first, if any, is guaranteed to be symmetrical). 2016-05-17 12:13:14 -04:00
Rob Rix
363a96c527 Note a case we want to handle correctly. 2016-05-17 12:11:46 -04:00
Rob Rix
ef9cf21d03 Only process asymmetrical intersecting children. 2016-05-17 12:08:22 -04:00
Rob Rix
8ef363713e Split the intersecting children into asymmetrical & symmetrical sublists. 2016-05-17 12:01:31 -04:00
Rob Rix
a380ae2147 Rename lines to children. 2016-05-16 14:46:23 -04:00
Rob Rix
e3d6cc9037 Drop empty children.
Fixes an issue where asymmetrical children were not being collected
into the top-level parent branch.
2016-05-16 13:26:09 -04:00
Rob Rix
2cbefee68b Don’t reprocess the nonintersecting split-off first lines. 2016-05-16 12:57:01 -04:00
Rob Rix
e40434f476 Test that we align insertions into empty branches without losing nodes. 2016-05-16 12:37:13 -04:00
Rob Rix
ba7988454b Add notes from our inaugural weekly meeting. 2016-05-16 11:31:44 -04:00
Rob Rix
6f819341ab Test that we align insertions which span the entirety of the thing. 2016-05-16 10:54:56 -04:00
Rob Rix
8f05beb023 Spacing for alignment. 2016-05-16 10:41:10 -04:00
Rob Rix
555fd7d124 Correct the inverted boolean. 2016-05-14 01:30:49 -04:00
Rob Rix
65827f17ac Correct the docs of why we pick left first. 2016-05-14 01:19:04 -04:00
Rob Rix
9cea134ee6 Call into alignBranch for Fixed nodes too. 2016-05-13 23:24:30 -04:00
Rob Rix
2008b63c17 Compute the maximum value in each element correctly. 2016-05-13 18:44:27 -04:00
Rob Rix
9567c44c57 Guarantee non-empty by prepending. 2016-05-13 18:38:19 -04:00