1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 17:59:10 +03:00
Commit Graph

591 Commits

Author SHA1 Message Date
Rob Rix
b04d71ede3 Compute the before-state of diffs.
This is `Optional`, as some diffs have unrecoverable before states. For
example, the insertion of a term has no before state, but can still
produce a valid before state if it occurs within the context of an
`Indexed` or `Keyed` node.

However, certain malformed diffs (such as `.Pure(.Insert(…))` in
isolation) may lack a valid before state, and thus the public API has
to reflect this.
2015-10-06 21:35:19 -04:00
Rob Rix
75aaebe834 Free has a Term typealias when appropriate. 2015-10-06 21:32:38 -04:00
Rob Rix
85ac68d232 Document why PatchConvertible. 2015-10-06 21:25:21 -04:00
Rob Rix
6b3c66d801 Patch is trivially PatchConvertible. 2015-10-06 21:24:43 -04:00
Rob Rix
46f3f9431b Add a PatchConvertible protocol to enable constrained extensions. 2015-10-06 21:24:01 -04:00
Rob Rix
eec173c560 Pass fixtures to the tool. 2015-10-06 21:17:17 -04:00
Rob Rix
6f7552bae0 Add a couple of fixtures. 2015-10-06 21:17:09 -04:00
Rob Rix
e736116211 Evaluate the algorithm. 2015-10-06 21:02:00 -04:00
Rob Rix
2b9993c5f4 Treat protocols as groups. 2015-10-06 21:01:53 -04:00
Rob Rix
38c50d4e4a Term is not a proper noun any more. 2015-10-06 20:53:35 -04:00
Rob Rix
e152d8702a /dev/null -> nil
`git difftool` will invoke us with /dev/null when a file has been
deleted.
2015-10-06 20:48:53 -04:00
Rob Rix
b3324a6c5f Drop null JSON. 2015-10-06 20:46:24 -04:00
Rob Rix
7e4ca06cbc Indexed, not Branch. 2015-10-06 20:45:50 -04:00
Rob Rix
706654552f In, not Roll. 2015-10-06 20:45:37 -04:00
Rob Rix
771f03f1fa Indentation. 2015-10-06 20:43:27 -04:00
Rob Rix
8a6a39f06a Construct terms for section headings. 2015-10-06 20:43:23 -04:00
Rob Rix
87d547a670 Wrap constructors in .In. 2015-10-06 20:43:02 -04:00
Rob Rix
40ecf24c9e Fix, not Term. 2015-10-06 20:39:57 -04:00
Rob Rix
f131f40752 Construct the terms in Fix. 2015-10-06 20:39:51 -04:00
Rob Rix
ee151d0edc Compute the diff in FreeAlgorithm. 2015-10-06 20:39:37 -04:00
Rob Rix
c7d9216433 Info is StringConvertible. 2015-10-06 20:38:00 -04:00
Rob Rix
c16a8b3af2 Combine the extensions. 2015-10-06 20:35:52 -04:00
Rob Rix
1059a00db0 🔥 AnyEquatable. 2015-10-06 19:20:16 -04:00
Rob Rix
939a714807 🔥 AnyHashable. 2015-10-06 19:20:06 -04:00
Rob Rix
fb41713906 Replace roll() with Diff(). 2015-10-06 17:48:17 -04:00
Rob Rix
47dd0b4849 Construct with Diff(), not copy(). 2015-10-06 17:47:10 -04:00
Rob Rix
c9d51049df Construct with Diff(), not copy(). 2015-10-06 17:47:04 -04:00
Rob Rix
de61021d32 Once more, call it Term. 2015-10-06 17:46:37 -04:00
Rob Rix
f51f6f39a2 Call it Term. 2015-10-06 17:46:02 -04:00
Rob Rix
22773917a3 Construct Free with Fix. 2015-10-06 17:45:24 -04:00
Rob Rix
d097f14fcb Explain SES implementation details a little. 2015-10-06 17:36:49 -04:00
Rob Rix
6030731cc8 Extend the graph and return Stream.Nil at the end. 2015-10-06 17:36:41 -04:00
Rob Rix
57fb8ff251 Document the purpose of the matrix. 2015-10-06 17:29:33 -04:00
Rob Rix
833d27c54a Test an insertion at the end. 2015-10-06 17:29:06 -04:00
Rob Rix
6e799e0b79 Test a deletion at the end. 2015-10-06 17:28:25 -04:00
Rob Rix
d7db7415dc Patches have different costs. 2015-10-06 17:08:22 -04:00
Rob Rix
4fdbcf948f Patches have a cost.
This charges `Replace` patches at a higher cost than `Insert`/`Delete`
patches to avoid spurious replacements.
2015-10-06 17:07:16 -04:00
Rob Rix
bcc3da35f9 Recur at the corner.
This can’t be right.
2015-10-06 17:01:27 -04:00
Rob Rix
c7aad22838 Insert/delete/recur based on the edge being followed. 2015-10-06 17:01:17 -04:00
Rob Rix
c2d4c96d62 Recurrence checks for equality. 2015-10-06 16:59:29 -04:00
Rob Rix
a1a832012e Implement a function copying terms into diffs. 2015-10-06 16:59:11 -04:00
Rob Rix
a628177722 Move SES to its own file. 2015-10-06 16:50:23 -04:00
Rob Rix
8e0cafbac4 Info’s debug description uses its categories’ debug descriptions. 2015-10-06 16:49:14 -04:00
Rob Rix
606d721dea Category is CustomDebugStringConvertible. 2015-10-06 16:48:44 -04:00
Rob Rix
ee8794fd81 Patch is CustomDebugStringConvertible. 2015-10-06 16:45:36 -04:00
Rob Rix
0237d5991a Fix is CustomDebugStringConvertible. 2015-10-06 16:44:00 -04:00
Rob Rix
29d889ef95 Free is CustomDebugStringConvertible. 2015-10-06 16:43:20 -04:00
Rob Rix
64830960e5 Info is CustomDebugStringConvertible. 2015-10-06 16:41:54 -04:00
Rob Rix
db63777dd9 Represent Insert/Delete explicitly in Patch.
Fixes #60.
2015-10-06 16:31:44 -04:00
Rob Rix
17191dd8ab Correct the tests to equate arrays of diffs by element, and not by memory (!).
- rdar://22996431
- rdar://22996542
2015-10-06 16:23:48 -04:00