1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00
Commit Graph

3780 Commits

Author SHA1 Message Date
Rob Rix
9343e9d4ae Do all formatting within Sources. 2015-12-24 00:20:47 -05:00
Rob Rix
cfeb9e4ee8 Move actualLines/actualLineRanges into the Source module. 2015-12-24 00:08:17 -05:00
Rob Rix
d355f268e6 Hide ++ in the tests. 2015-12-23 23:44:02 -05:00
Rob Rix
eb461a3915 Concatenate Sources in actualLines. 2015-12-23 23:41:31 -05:00
Rob Rix
4395e49104 Define Source concatenation. 2015-12-23 23:41:08 -05:00
Rob Rix
69aadf4ec5 Rename makeSourcefromList. 2015-12-23 23:37:51 -05:00
Rob Rix
b138864068 Correct the tests. 2015-12-23 23:36:49 -05:00
Rob Rix
3ca9064869 O(1) indexing. 2015-12-23 23:29:27 -05:00
Rob Rix
8a2aca45e1 Tacit definition of null. 2015-12-23 23:28:13 -05:00
Rob Rix
ad6e7f2ae7 Tacit definition of slice. 2015-12-23 23:27:07 -05:00
Rob Rix
0bb6462fad Rename unSource to toList. 2015-12-23 23:26:37 -05:00
Rob Rix
e4225faa20 Rename subsourceslice. 2015-12-23 23:25:00 -05:00
Rob Rix
55d3ed38a4 A let expression makes more sense. 2015-12-23 23:23:16 -05:00
Rob Rix
83173a7b96 Fewer parens. 2015-12-23 23:22:29 -05:00
Rob Rix
03526754e9 subsource uses the correct start/length bounds. 2015-12-23 23:21:51 -05:00
Rob Rix
588b1a68ee Avoid most of the conversions into/out of Source. 2015-12-23 23:17:35 -05:00
Rob Rix
a19115b267 Define break over Source. 2015-12-23 23:16:09 -05:00
Rob Rix
b6e05008ec cons over Source. 2015-12-23 23:06:49 -05:00
Rob Rix
f89b05bb41 Define a getVector function for Source. 2015-12-23 23:06:38 -05:00
Rob Rix
ee91b130e4 Add API to destructure a Source. 2015-12-23 23:05:01 -05:00
Rob Rix
08122476e6 Add API to test whether a Source is empty. 2015-12-23 23:04:50 -05:00
Rob Rix
f3d65ea6db Define actualLines by means of a single conversion to String. 2015-12-23 22:55:44 -05:00
Rob Rix
76f11db98e Define Source over Data.Vector. 2015-12-23 22:48:31 -05:00
Rob Rix
e9449fccb8 Move Source & its API to the Source module. 2015-12-23 22:38:20 -05:00
Rob Rix
cc9dee5704 Stub in a Source module. 2015-12-23 22:38:02 -05:00
Rob Rix
61eccbcd80 Link against vector instead. 2015-12-23 22:35:55 -05:00
Rob Rix
d7ad161495 Build leaves from the sources on either side. 2015-12-23 22:34:27 -05:00
Rob Rix
2e823392d1 Filter the strings in the sources. 2015-12-23 22:30:11 -05:00
Rob Rix
f1ab391423 arbitraryLeaf produces a Source. 2015-12-23 22:27:48 -05:00
Rob Rix
5e8e9bda5f Construct leaves with subsources. 2015-12-23 22:27:42 -05:00
Rob Rix
7b6bc623c9 Get some more total ranges from sources. 2015-12-23 22:27:30 -05:00
Rob Rix
adc850f328 Unwrap the source before filtering. 2015-12-23 22:27:21 -05:00
Rob Rix
75ead61274 Move getTotalRange into the tests.
It’s kind of a lie.
2015-12-23 22:20:35 -05:00
Rob Rix
99b04b4038 isOnSingleLine takes a Source. 2015-12-23 22:19:29 -05:00
Rob Rix
e0560d272b Use getTotalRange in the tests. 2015-12-23 22:18:10 -05:00
Rob Rix
60aecae119 Add an Arbitrary instance over Source. 2015-12-23 22:18:01 -05:00
Rob Rix
62143c1acf Add a function to compute the total range of a Source. 2015-12-23 22:17:16 -05:00
Rob Rix
4219f438be Make sources in the openLineBy tests. 2015-12-23 22:10:30 -05:00
Rob Rix
20fab3f0fa Use makeSource to construct the sources. 2015-12-23 21:52:44 -05:00
Rob Rix
c1f606a499 Add a makeSource function. 2015-12-23 21:51:56 -05:00
Rob Rix
b7f6b99fba Source carries an offset field. 2015-12-23 21:50:40 -05:00
Rob Rix
4ef1ddbf1d Define Source as a newtype. 2015-12-23 21:42:51 -05:00
Rob Rix
4d368b0180 substring is a synonym for sublist. 2015-12-23 21:39:50 -05:00
Rob Rix
653acdc30f Add a sublist function. 2015-12-23 21:39:35 -05:00
Rob Rix
002147ac3e Add a type parameter for the elements of Sources. 2015-12-23 21:38:23 -05:00
Rob Rix
6a879d4967 Remove the annotation from sources. 2015-12-23 21:37:53 -05:00
Rob Rix
145720123f Use toString when rendering. 2015-12-23 21:33:59 -05:00
Rob Rix
a2521837ea Stub in API to render a Source to a String. 2015-12-23 21:33:07 -05:00
Rob Rix
6fccea8ce9 Pass Sources around everywhere. 2015-12-23 21:30:12 -05:00
Rob Rix
8158386f98 Use sources, not before/after. 2015-12-23 21:29:58 -05:00