Rob Rix
6a2f773a1d
Merge branch 'what-the-text' of https://github.com/github/semantic-diff into what-the-text
2017-02-13 13:51:39 -05:00
Rob Rix
566891afb7
Offset by the parent’s starting index.
2017-02-13 13:51:07 -05:00
Timothy Clem
775684c31a
++haskell-tree-sitter again
2017-02-13 10:42:48 -08:00
Timothy Clem
cc84373c6e
++haskell-tree-sitter
2017-02-13 10:29:02 -08:00
Rob Rix
7cf8a7ddbb
Compute the child node’s range, not the parent’s.
2017-02-13 12:28:05 -05:00
Rob Rix
5c17ab5149
Restore AlignmentSpec to its former “glory.”
2017-02-13 12:17:46 -05:00
Rob Rix
e0fe090074
Test actualLineRanges over Source directly.
2017-02-13 11:58:30 -05:00
Rob Rix
329485febd
Define a Listable instance for Source.
2017-02-13 11:55:20 -05:00
Rob Rix
d18dfe453e
Use the correct offset for child ranges.
...
This also ensures that getChild must close over the correct range & source.
2017-02-13 11:41:57 -05:00
Rob Rix
b473e4eafe
Extract isNonEmpty & nodeRange.
2017-02-13 11:41:10 -05:00
Rob Rix
47ea50ae01
Merge branch 'what-the-text' of https://github.com/github/semantic-diff into what-the-text
2017-02-13 11:39:09 -05:00
Timothy Clem
50f3b61760
Merge branch 'master' into what-the-text
2017-02-13 08:33:39 -08:00
Rob Rix
e03c8abb69
Test Source properties with LeanCheck.
2017-02-13 10:55:57 -05:00
Rob Rix
0ce897db17
🔥 Source.uncons.
2017-02-13 10:17:55 -05:00
Rob Rix
3a0064e796
Define actualLines over Text internally.
2017-02-13 10:17:44 -05:00
Rob Rix
86be2c584e
🔥 toString.
2017-02-13 09:39:56 -05:00
Rob Rix
24722c3fb6
Render Text.
2017-02-13 09:39:33 -05:00
Timothy Clem
4f8e0e23f5
++haskell-tree-sitter
2017-02-10 15:35:09 -08:00
Timothy Clem
0c0287642b
🔥 temp.rb
2017-02-10 15:35:09 -08:00
Rob Rix
802c048ec6
Pull the drop & take into the where clause.
...
This change, while semantically equivalent, causes `slice` to complete in approximately 1/3rd the time, and allocate only a fraction as much.
Maybe ghc can fuse this better or something? I honestly have no idea, but I’ll take it.
/cc @github/semantic-code
2017-02-10 17:09:54 -05:00
Rob Rix
2bfc2d91c8
Offset the child range correctly.
2017-02-10 16:57:33 -05:00
Rob Rix
f8cc3b8933
Close over the right source.
2017-02-10 16:53:40 -05:00
Rob Rix
00c14e403a
Revert "Source carries its Range."
...
This reverts commit 6e075787935c10b0bd7256673a5623cb5d1a4945.
2017-02-10 16:44:09 -05:00
Rob Rix
f3bad55fee
Revert "Close over the correct source."
...
This reverts commit 6770d9970d9e4aee6029e9b739583c1dc8cfc372.
2017-02-10 16:44:07 -05:00
Rob Rix
46aa3b8fc0
Revert "Take the range from the source."
...
This reverts commit fd59885f1dc0a4dba976617ed6791d76ad44f708.
2017-02-10 16:44:06 -05:00
Rob Rix
aa78d3215f
Revert "Make doubly sure we don’t close over the wrong variable."
...
This reverts commit 9d24a050f33ad4e123f82a272331d39fd75de68b.
2017-02-10 16:44:03 -05:00
Rob Rix
7d019b9032
Revert "O(1) length."
...
This reverts commit db4025e8daacf7a8a716b5ddc621b6053cff768f.
2017-02-10 16:44:00 -05:00
Rob Rix
8e241ef71d
Revert "Use O(1) length to find line ranges."
...
This reverts commit 2c5ec5a3254ce88756ddc9312ff50cbdf884789d.
2017-02-10 16:43:57 -05:00
Rob Rix
92831bc12f
Revert "Get the total range of a Source in O(1)."
...
This reverts commit b867910530a6078bb2336e7abc7fca8327851435.
2017-02-10 16:43:55 -05:00
Rob Rix
901f085bec
Revert "Strictify Source’s fields."
...
This reverts commit 4b1917a45aa841db8f3fa30bf0d7fd2757f11b42.
2017-02-10 16:43:52 -05:00
Rob Rix
913fb11aa8
Strictify Source’s fields.
2017-02-10 16:42:41 -05:00
Rob Rix
9a23a6ae40
Get the total range of a Source in O(1).
2017-02-10 15:58:35 -05:00
Rob Rix
c18f3b8224
Use O(1) length to find line ranges.
2017-02-10 15:49:25 -05:00
Rob Rix
ff2d0e6de6
O(1) length.
2017-02-10 15:48:24 -05:00
Rob Rix
d1a5167999
Make doubly sure we don’t close over the wrong variable.
2017-02-10 15:45:02 -05:00
Josh Vera
91e88f077a
Merge branch 'master' into automate-updating-dotcom
2017-02-10 15:43:41 -05:00
Rob Rix
94c448bef3
Take the range from the source.
2017-02-10 15:42:16 -05:00
Rob Rix
26efa43611
Close over the correct source.
2017-02-10 15:35:10 -05:00
Rob Rix
672ff179ed
Source carries its Range.
2017-02-10 15:33:41 -05:00
Rob Rix
3298641a3b
Define a function to divide a range in two.
2017-02-10 15:22:27 -05:00
Rob Rix
6bc9971661
Rename unSource to sourceText.
2017-02-10 15:12:39 -05:00
Rob Rix
2a30f6d462
Pre-slice in termToDiffInfo.
2017-02-10 14:23:42 -05:00
Rob Rix
5134595525
Rename blob to source.
2017-02-10 14:18:55 -05:00
Rob Rix
bab725047d
Divide once and multiply d times.
2017-02-10 13:31:06 -05:00
Rob Rix
d28e0f23ac
Merge remote-tracking branch 'origin/master' into what-the-text
2017-02-10 13:10:46 -05:00
Rick Winfrey
8e2c3e0147
Merge pull request #978 from github/cache-and-discard-feature-vectors
...
Cache and discard feature vectors
2017-02-10 10:01:53 -08:00
Rob Rix
f723b576e1
Pass the getter in.
2017-02-10 12:59:22 -05:00
Rob Rix
ad5d659941
Cut down on crossing the FFI.
2017-02-10 12:58:15 -05:00
Rob Rix
5688c2b447
Pre-slice the source passed to toTerm.
2017-02-10 12:26:02 -05:00
Rob Rix
9bcabf21b7
Extract a function to retrieve the range for a node.
2017-02-10 12:24:10 -05:00