Commit Graph

434 Commits (d01f04d5b7a0a7b1e3b19ac7ddc346989847bc7a)
 

Author SHA1 Message Date
Wilfred Hughes d01f04d5b7 Add LICENSE file 2021-07-04 11:41:39 +07:00
Wilfred Hughes 9cd63c972d Adding a changelog 2021-07-04 11:40:31 +07:00
Wilfred Hughes 147ab76414 Keep all sample files in sample_files/ 2021-07-04 11:10:16 +07:00
Wilfred Hughes 78483d7480 More package metadata 2021-07-03 23:14:22 +07:00
Wilfred Hughes cf2b5d762a Bump version for initial release 2021-07-03 23:09:11 +07:00
Wilfred Hughes ff179d311b Improve header display
Use a newline to help diffing multiple files, use yellow and bold to
match GNU diff, make header more concise.
2021-07-03 23:04:24 +07:00
Wilfred Hughes 8012ab9f75 Improve header to make filename prominent and show recognised language 2021-07-03 22:53:59 +07:00
Wilfred Hughes 4afb6b2f2e Print the name of the file being diffed 2021-07-03 22:44:28 +07:00
Wilfred Hughes 3875ae7821 Unconditionally store the cache value 2021-07-03 21:21:49 +07:00
Wilfred Hughes c3cbb9c804 Make clippy happier 2021-07-03 16:04:21 +07:00
Wilfred Hughes 3c0662f31b cargo fmt 2021-07-03 15:57:37 +07:00
Wilfred Hughes 451e58a31a Rename Node to Syntax 2021-07-03 15:55:48 +07:00
Wilfred Hughes 680bc13a6c Rename tree_diff to syntax 2021-07-03 15:47:18 +07:00
Wilfred Hughes a38b20d5a6 Prefer rustc-hash for faster hashing
This is hot when profiling.
2021-07-03 15:42:23 +07:00
Wilfred Hughes 4790885203 Don't debug format nodes unless something has gone wrong 2021-07-03 15:31:58 +07:00
Wilfred Hughes 0d2c95551e Cache the hash value for atoms too 2021-07-03 15:31:13 +07:00
Wilfred Hughes 76db335282 Cache the hash value of syntax lists 2021-07-03 15:04:35 +07:00
Wilfred Hughes 6caeba31a6 Ensure that we consider nodes after empty lists with a change delimiter 2021-07-03 13:11:03 +07:00
Wilfred Hughes e9e4fad0f6 Use default Node equality and hashing where possible 2021-07-03 12:06:34 +07:00
Wilfred Hughes c5511fdd9b Compare Node by content and position 2021-07-03 12:05:04 +07:00
Wilfred Hughes ad76bb9db9 Use equal_content for PartialEq on Node 2021-07-03 11:58:04 +07:00
Wilfred Hughes bc0e334f2f Remove old tree diffing impl 2021-07-03 11:55:24 +07:00
Wilfred Hughes 8dd77cc118 Define an explict node equality predicate that uses content 2021-07-03 11:33:49 +07:00
Wilfred Hughes 3a0069dca7 Ensure identical atoms in different locations are not equal for graph 2021-07-02 23:07:32 +07:00
Wilfred Hughes bdd16d1786 Ensure test atoms/lists have unique positions 2021-07-02 22:45:58 +07:00
Wilfred Hughes 323818543a Make Node.change debug printing more concise 2021-07-02 22:35:56 +07:00
Wilfred Hughes 31f672be70 Remove obvious type annotation 2021-07-02 22:30:03 +07:00
Wilfred Hughes a51be3e492 Inline needless variable 2021-07-02 22:13:51 +07:00
Wilfred Hughes cbd7fba325 Refactor repeated push calls 2021-07-02 22:11:38 +07:00
Wilfred Hughes 6a95422634 Tweak field names 2021-07-02 22:06:31 +07:00
Wilfred Hughes d260e23589 Derive Eq and Hash on Vertex 2021-07-02 22:03:42 +07:00
Wilfred Hughes 3edd453f76 Store distance on OrdVertex directly 2021-07-02 22:00:38 +07:00
Wilfred Hughes b26fefaf23 Clarify that we find the shortest route 2021-07-02 21:53:39 +07:00
Wilfred Hughes f4c88e95e1 Rename module 2021-07-02 21:52:44 +07:00
Wilfred Hughes 5dc0c81553 Also print next when displaying Node 2021-07-02 18:23:34 +07:00
Wilfred Hughes 57dc746d84 Make debug printing of Node less verbose 2021-07-02 18:14:13 +07:00
Wilfred Hughes b956f0da1d Silence build warnings for unused WIP code 2021-07-02 18:03:29 +07:00
Wilfred Hughes d36cae7d10 Print node missing changes 2021-07-02 18:02:29 +07:00
Wilfred Hughes b4034d558c Use new route diffing from main driver 2021-07-02 18:00:28 +07:00
Wilfred Hughes 83a02e4eb0 Mark nodes after finding a route 2021-07-02 17:40:48 +07:00
Wilfred Hughes 58a85106e0 Consistent edge terminology 2021-07-02 17:30:38 +07:00
Wilfred Hughes 2f44a32fad Don't implement traits on Vertex directly 2021-07-02 17:27:17 +07:00
Wilfred Hughes 56b9761579 Use Vertex and neighbour terminology 2021-07-02 17:23:57 +07:00
Wilfred Hughes 7a3996690d Don't store edges in vertices 2021-07-02 17:16:22 +07:00
Wilfred Hughes caa6ca0899 Store edges separately 2021-07-02 16:58:12 +07:00
Wilfred Hughes 89a5345607 Better name for edges in graph 2021-07-02 16:53:40 +07:00
Wilfred Hughes d2bb7f50b5 Refactor test assertions to check all actions in route 2021-07-02 09:50:55 +07:00
Wilfred Hughes e25b3431dd Track unchanged delimiters too 2021-07-01 23:31:06 +07:00
Wilfred Hughes cfde60ed62 Consider Action when comparing EqualityGraphNode values 2021-07-01 23:31:06 +07:00
Wilfred Hughes ab1edfe39a Terminate when the outer loop sees an end node 2021-07-01 23:30:49 +07:00