1
1
mirror of https://github.com/github/semantic.git synced 2024-12-22 14:21:31 +03:00
Commit Graph

6150 Commits

Author SHA1 Message Date
Rob Rix
12663f1158 Add ByKey to Diff. 2015-10-01 13:54:23 -04:00
Rob Rix
dda95ed386 Require Term’s leaf type to be Equatable.
This is a bit of a hack.
2015-10-01 13:52:32 -04:00
Rob Rix
fb247732cc Move diff equality into Diff.swift. 2015-10-01 11:34:17 -04:00
Rob Rix
8bac863ca0 Hash is AlgebraicHashable. 2015-10-01 10:46:25 -04:00
Rob Rix
009920606b Add unordered hashing. 2015-10-01 10:45:47 -04:00
Rob Rix
cdd05ab556 Extract the calculation of the magnitude of a syntax node into a function. 2015-10-01 10:45:23 -04:00
Rob Rix
97da6a15e4 Document Diff’s cases. 2015-10-01 10:45:06 -04:00
Rob Rix
2394ea3545 Correct AnyEquatable equality. 2015-10-01 10:34:36 -04:00
Rob Rix
fae5fc5123 Correct Syntax.hash() to refer to Ordered. 2015-10-01 10:33:47 -04:00
Rob Rix
12491dde7a AnyHashable convenience constructor. 2015-10-01 10:32:44 -04:00
Rob Rix
3ea42437f9 Abstract AnyHashable over AnyEquatable. 2015-10-01 10:31:18 -04:00
Rob Rix
39bbe4df42 AnyEquatable can unpack its value. 2015-10-01 10:29:48 -04:00
Rob Rix
72c1029d33 AnyHashable can unpack its value. 2015-10-01 10:28:24 -04:00
Rob Rix
079b3a479e AnyEquatable. 2015-10-01 10:28:14 -04:00
Rob Rix
279aab6530 Rename Sequence to Ordered. 2015-10-01 10:09:44 -04:00
Rob Rix
a2a55531c9 AnyHashable. 2015-10-01 09:59:26 -04:00
Rob Rix
18d74a9d9c Diff is AlgebraicHashable. 2015-10-01 09:54:56 -04:00
Rob Rix
0013475516 Terms of Hashable leaf type can be hashed. 2015-10-01 09:54:44 -04:00
Rob Rix
c698280fc2 Pass the hashing function for the Recur type in. 2015-10-01 09:53:30 -04:00
Rob Rix
1635b8ab8a Info is AlgebraicHashable. 2015-10-01 09:46:02 -04:00
Rob Rix
cb5b7c0b33 Merge pull request #40 from github/syntactic-categorization
Syntactic categorization
2015-09-30 16:08:30 -04:00
Rob Rix
5dd80cb0ce Diff is defined over Term<Info>.
This enables diffs to operate on categorized Terms.
2015-09-30 16:05:39 -04:00
Rob Rix
84eeba6111 Info has a property for its Categories. 2015-09-30 16:02:01 -04:00
Rob Rix
d29e14508a Info has a Set of Categories. 2015-09-30 16:01:47 -04:00
Rob Rix
1ed5fc0e88 Categories are Hashable. 2015-09-30 16:00:13 -04:00
Rob Rix
282f56fb90 Categories have an accessor for their tag. 2015-09-30 16:00:03 -04:00
Rob Rix
5abbd36a80 Replace Location with Info. 2015-09-30 15:58:01 -04:00
Rob Rix
ddbe0943ef Location is Equatable. 2015-09-30 15:46:21 -04:00
Rob Rix
66281a6674 Document Literal Locations. 2015-09-30 15:46:16 -04:00
Rob Rix
0efffe3e3d Add source locations. 2015-09-30 15:29:56 -04:00
Rob Rix
459bad4dd6 Categories are equatable. 2015-09-30 15:29:40 -04:00
Rob Rix
f3122f1bae Move JSON construction of Term into doubt-swift. 2015-09-30 15:08:19 -04:00
Rob Rix
03d4fcfc53 Add Category. 2015-09-30 15:03:47 -04:00
Rob Rix
d7a8c64806 Abbreviate the properties. 2015-09-30 15:03:42 -04:00
Rob Rix
82720340ef Wrap with Term(). 2015-09-30 15:03:37 -04:00
Rob Rix
d8c718130b Lose an annotation. 2015-09-30 15:03:30 -04:00
Rob Rix
a6358b22d4 Remove CustomHashConvertible. 2015-09-30 15:02:31 -04:00
Rob Rix
2d0991b91f Abstract Term over a type parameter A. 2015-09-30 14:42:58 -04:00
Rob Rix
a2b9f9ce17 Implement Syntax equality using a function which expresses the equality of the functor. 2015-09-30 14:42:44 -04:00
Rob Rix
92d844f416 Extract the exception-for-control-flow ErrorType to global scope. 2015-09-30 14:40:30 -04:00
Rob Rix
6ecf6fdd98 Merge pull request #39 from github/simpler-ast
Simpler AST
2015-09-30 12:43:43 -04:00
Rob Rix
88b677e1e0 Parameterize the type of Leaf. 2015-09-30 12:41:20 -04:00
Rob Rix
5529a502e3 Require Recur to be Hashable. 2015-09-30 12:40:49 -04:00
Rob Rix
de3ef64f48 Map using Hash.init. 2015-09-30 12:40:36 -04:00
Rob Rix
5fa07014a6 Replace all the other nodes with Branch. 2015-09-30 11:42:41 -04:00
Rob Rix
a0f562d25e Leaves, not Literals. 2015-09-30 11:03:55 -04:00
Rob Rix
4712e1c2cc Add CustomHashConvertible for non-Equatable objects that can be converted to Hashes. 2015-09-30 10:46:01 -04:00
Rob Rix
66b225fce3 Replace Case with a constructor. 2015-09-30 10:44:48 -04:00
Rob Rix
565800b1b0 Add a constructor for Int hashes. 2015-09-30 10:43:18 -04:00
Rob Rix
9841debe91 No longer need to disambiguate String. 2015-09-30 10:42:43 -04:00