Rob Rix
d28ab9041d
Use the strArgument shorthand.
2015-12-15 23:20:33 -05:00
Rob Rix
3c8b79f0b0
Correct some merge confusion.
2015-12-14 17:22:53 -05:00
Rob Rix
cded6c0d7d
Get the substrings out at the same time as computing the ranges.
2015-12-14 15:37:30 -05:00
Rob Rix
df4b74876a
Rename the word ranges function.
2015-12-14 15:31:45 -05:00
Rob Rix
9c1dd640f5
Don’t bind subrange, since we only use it once.
2015-12-14 14:41:12 -05:00
Rob Rix
1d9e945aad
Pass absolute start indices to children.
2015-12-14 14:40:30 -05:00
Rob Rix
714c8ff682
Compute the substring from the subrange.
2015-12-14 14:39:50 -05:00
Rob Rix
37f236d7d7
Remove redundant imports.
2015-12-14 14:15:46 -05:00
Rob Rix
4083829e12
Bind a different variable for the subrange.
2015-12-14 13:04:21 -05:00
Rob Rix
c115262f7f
Share a single computation of the substring for each case.
2015-12-14 13:01:17 -05:00
Rob Rix
718399c7d9
Compute the substring once and only once.
2015-12-14 12:59:47 -05:00
Rob Rix
bf9aa915a3
Move rangesOfWordsFrom into Range.hs.
2015-12-14 12:44:48 -05:00
Rob Rix
8acc962ad2
Offset leaves’ ranges to get the substrings.
2015-12-14 12:40:08 -05:00
Rob Rix
bac6b696a5
Make leaves within the parent’s substring.
2015-12-14 12:39:56 -05:00
Rob Rix
dbce74368f
Pass the start index to makeLeaf.
2015-12-14 12:39:09 -05:00
Rob Rix
41032f0399
We don’t need a $ here.
2015-12-14 12:37:23 -05:00
Rob Rix
6fc7632e93
Only pass the start index around.
2015-12-14 12:37:07 -05:00
Rob Rix
774f731ab1
Pass the source to makeLeaf.
2015-12-14 12:35:16 -05:00
Rob Rix
4dd9907130
Try negating the offset.
2015-12-14 12:34:18 -05:00
Rob Rix
4cd2b2db7a
Parentheses are not required here.
2015-12-14 12:25:09 -05:00
Rob Rix
a239384831
Work within recursively smaller and smaller substrings.
...
This resolves the O(n²) behaviour we were seeing.
2015-12-14 12:24:55 -05:00
Rob Rix
79e4860c62
Pass the source & root to recursive invocations.
2015-12-14 12:18:58 -05:00
Rob Rix
039e5849ca
Revert "Shadow the outer function’s name."
...
This reverts commit 4cb7c975334d540b9ef08d59724536d2bbd8fda0.
2015-12-14 12:17:35 -05:00
Rob Rix
c004eb739e
Revert "Push the inner function out and operate within substrings."
...
This reverts commit 435ba7a2e35d9a4bb61413b91895b88bf3cb2be9.
2015-12-14 12:17:30 -05:00
Rob Rix
b08bb04767
Push the inner function out and operate within substrings.
2015-12-14 12:16:44 -05:00
Rob Rix
1c3db7ae47
Shadow the outer function’s name.
2015-12-14 12:15:55 -05:00
Rob Rix
ae047f3012
Reorder the parameters for partial application.
2015-12-14 12:15:28 -05:00
Rob Rix
6dbaf9f53a
Replace wordy leaves in both terms.
2015-12-14 12:13:18 -05:00
Rob Rix
36747be406
Add a function replacing wordy leaves in a term with branches of per-word leaves.
2015-12-14 12:09:21 -05:00
Rob Rix
0944591fab
Add a function computing the ranges of non-whitespace substrings within a string.
2015-12-14 12:08:33 -05:00
Rob Rix
9e8a6f8456
Default to the line by line parser.
2015-12-09 10:36:37 -05:00
Rob Rix
a75c1b0482
No need to reinvent fmap.
2015-12-09 10:18:52 -05:00
Rob Rix
da3634c59a
parserForType
returns a Parser.
...
This change moves the languages out of IO. I believe this to be correct
(as they should be referentially transparent) but we may wish to review
that carefully.
2015-12-09 10:11:30 -05:00
Rob Rix
d7f415da04
Move all of the tree-sitter stuff into its own module.
2015-12-09 09:58:15 -05:00
Rob Rix
dcbf7bafb7
Use the Parser type.
2015-12-09 09:50:55 -05:00
Rob Rix
49910d1d1e
Render HTML to Html.
2015-12-07 14:34:58 -05:00
Rob Rix
a5e7341322
Push the let bindings out a bit.
2015-12-07 14:23:32 -05:00
joshvera
395cfde9aa
takeExtension returns extensions with dots
2015-12-04 16:25:01 -05:00
joshvera
d7089ec506
Remove unused parser type
2015-12-03 15:54:41 -05:00
joshvera
395eee7f7c
Merge remote-tracking branch 'origin/split-diffs-in-haskell' into select-grammar
2015-12-03 15:50:26 -05:00
joshvera
d43ced80f5
we just say ts_language_javascript
2015-12-03 15:34:41 -05:00
joshvera
79f2f94c2c
Add ts_language_js as a language
2015-12-03 15:21:34 -05:00
joshvera
c20ea6ee78
Switch parsers on mediaType
2015-12-03 15:10:49 -05:00
joshvera
370fbe4819
remove duplicate imports
2015-12-03 14:03:10 -05:00
joshvera
2a063d3277
Move Range to a module
2015-12-02 21:40:34 -05:00
joshvera
1dd8d93ce1
use fromIntegral
2015-12-02 14:29:19 -05:00
Rob Rix
25b1756419
Populate the line range.
2015-12-01 15:04:23 -05:00
Rob Rix
1b5f6b848d
stub line ranges in Info
2015-12-01 14:51:21 -05:00
Rob Rix
8600d7d71b
Stub in split diff rendering.
2015-12-01 11:33:16 -05:00
Rob Rix
226dc1e966
Hide Data.Set.split
.
2015-12-01 11:33:10 -05:00