Rick Winfrey
150127f99b
Limit syntaxes that are annotatable to subset of those syntaxes that are identifiable
2016-10-03 14:24:50 -05:00
Timothy Clem
c1aa35f586
Obey --output argument
2016-10-03 10:49:10 -07:00
Josh Vera
43ab2a644c
Merge branch 'master' into diff-with-no-index
2016-09-30 17:35:20 -04:00
Timothy Clem
4f1a609bda
Catch string identifiers and skip squoting
2016-09-30 14:09:30 -07:00
Timothy Clem
60e86181aa
New DiffMode datatype instead of noIndex Bool
2016-09-30 13:52:31 -07:00
Rick Winfrey
bc02700086
Merge branch 'master' into parent-context
2016-09-30 10:49:46 -05:00
Rick Winfrey
ee4a89bfea
Update prependSummary so all Annotatable terms are prepended to the parentAnnotation
...
Since the paramorphism works by starting at leaves and working towards
the roots, prepending parentAnnotations with the current term means we
always ascribe parent contexts in the correct order (parent -> child ->
grand child …)
2016-09-30 10:03:11 -05:00
Rick Winfrey
9691d1269c
Update DiffSummary arbitrary instance ( 🔥 grandParentAnnotation)
2016-09-30 10:02:02 -05:00
Rick Winfrey
54eec372bf
Add parentContexts (and hsep)
...
hsep :: [Doc] -> Doc
The document (hsep xs) concatenates all documents xs horizontally with
(<+>).
(From Text.PrettyPrint.Leijen)
2016-09-30 10:01:33 -05:00
Rick Winfrey
197d8dc0af
🔥 maybeParentContext and maybeGrandParentContext
2016-09-30 10:00:33 -05:00
Rick Winfrey
b0fb1d4a6b
🔥 grandParentAnnotation
...
Also convert parentAnnotation to a [(Category, Text)], rather than
Maybe (Category, Text)
2016-09-30 10:00:03 -05:00
Rick Winfrey
243727d1b1
Remove doc formatting separator
2016-09-29 18:50:50 -05:00
Rick Winfrey
d42e79c189
Use annotatable smart constructor for determining grandParentAnnotation
2016-09-29 18:50:36 -05:00
Rick Winfrey
497421250f
Add annotatable smart constructor
2016-09-29 18:50:19 -05:00
Timothy Clem
d03a0c78f7
Better to have these as their own data records
2016-09-29 16:22:45 -07:00
Timothy Clem
fb8849ecae
Refactor argument parsing
2016-09-29 15:56:39 -07:00
Timothy Clem
a269e6c28a
Merge branch 'diff-with-no-index-args-parse' into diff-with-no-index
2016-09-29 14:12:13 -07:00
Timothy Clem
f93f67ebf7
Merge branch 'master' of https://github.com/github/semantic-diff into diff-with-no-index
2016-09-29 13:15:52 -07:00
joshvera
ff7e2aa18a
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-29 11:45:55 -04:00
Timothy Clem
716a0a8f45
Disambiguate between named functions no params and anon functions with
2016-09-28 16:15:44 -07:00
joshvera
175dda93b3
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-28 17:04:17 -04:00
Josh Vera
118f2d0812
Merge branch 'master' into all-files
2016-09-28 15:05:24 -04:00
Josh Vera
ff5c8874ed
Merge branch 'master' into all-files
2016-09-28 14:59:53 -04:00
joshvera
36f3f98d9e
indentation
2016-09-28 14:58:54 -04:00
joshvera
ee0b7a7132
Move minimumTermIndex to a function
2016-09-28 14:54:21 -04:00
Josh Vera
9fa777dea0
Merge branch 'master' into improve-anonymous-function-summaries
2016-09-28 14:48:25 -04:00
joshvera
b4b02870f8
formatting
2016-09-28 13:25:50 -04:00
joshvera
088ad770a1
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-28 13:23:56 -04:00
Timothy Clem
edacadaafd
Params before the word 'function'
2016-09-28 08:23:46 -07:00
Rick Winfrey
0aff617d07
🔥 comment -- context is no longer present
2016-09-28 08:50:44 -05:00
Rick Winfrey
8e67113507
🔥 MathAssignment termToDiffInfo case
2016-09-28 08:49:34 -05:00
Rick Winfrey
4dca35677c
🔥 Assignment termToDiffInfo case
2016-09-28 08:49:19 -05:00
Rick Winfrey
a227651831
🔥 Function termToDiffInfo case
2016-09-28 08:49:07 -05:00
Rick Winfrey
311f3a4223
🔥 Ternary termToDiffInfo case
2016-09-28 08:48:55 -05:00
Rick Winfrey
e19367e36b
🔥 AnonymousFunction termToDiffInfo case
2016-09-28 08:44:56 -05:00
Rick Winfrey
cc59a9e05c
🔥 unnecessary case condition
2016-09-28 08:43:27 -05:00
Rick Winfrey
d86c12d672
Output grandParentAnnotation doc
2016-09-28 08:01:40 -05:00
Rick Winfrey
139b45f3e4
Experiment with adding grandParentAnnotation to DiffInfo
2016-09-28 08:01:26 -05:00
Rick Winfrey
b27d45458d
Add grandParentAnnotation field to DiffInfo record
2016-09-28 08:00:31 -05:00
Timothy Clem
b8ad29fbca
Custom argument parsing for sha ranges and file paths
2016-09-27 14:56:29 -07:00
Timothy Clem
bbc6f06185
Cleanup use of qualified Prelude
2016-09-27 12:59:01 -07:00
Timothy Clem
d175993a3f
Use FilePath type
2016-09-27 12:58:45 -07:00
Josh Vera
8502663eac
Merge branch 'master' into all-files
2016-09-27 10:49:12 -04:00
Josh Vera
388ca5f71b
Merge branch 'master' into improve-anonymous-function-summaries
2016-09-27 10:48:03 -04:00
joshvera
3a05796f45
redundant constraints
2016-09-27 10:38:29 -04:00
joshvera
8cf63a31f2
-Werror fixes
2016-09-27 10:36:03 -04:00
joshvera
bfe57829d6
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-27 10:34:19 -04:00
Rob Rix
e6fa5c6f29
Merge branch 'master' into free-applicative-algorithms
2016-09-27 06:28:53 -04:00
Timothy Clem
23d733a0e3
Merge branch 'master' into all-files
2016-09-26 14:56:30 -07:00
Timothy Clem
4d6499c5d6
Go with concise phrasing
2016-09-26 14:46:40 -07:00
Timothy Clem
05afc0b795
Use camelCase for filePaths argument name
2016-09-26 13:34:59 -07:00
Josh Vera
a5c0e0df84
Merge branch 'master' into improve-anonymous-function-summaries
2016-09-27 00:32:45 +09:00
Rob Rix
95490d7ff9
Rename wrapped to underlying.
2016-09-25 17:10:14 +09:00
Rob Rix
64b491345e
Rephrase in terms of Applicative primitives.
2016-09-25 17:08:40 +09:00
Rob Rix
ee80e76c1d
Use & instead of flipping $.
2016-09-25 17:06:00 +09:00
Rob Rix
853bf4352f
Rename the fields in Ap.
2016-09-25 16:25:06 +09:00
Rob Rix
6d44a9f891
fmap infix.
2016-09-25 16:23:31 +09:00
Rob Rix
217f51df73
📝 iterAp.
2016-09-25 16:22:14 +09:00
Rob Rix
9e026bbe71
Rename iter to iterAp.
2016-09-25 16:21:40 +09:00
Rob Rix
66142c7281
Correct the documentation for Algorithm.
2016-09-25 15:50:49 +09:00
Rob Rix
434e03a89e
Consolidate the annotation.
2016-09-25 15:33:55 +09:00
Rob Rix
b701aed781
Move the annotate call onto the next line.
2016-09-25 15:32:24 +09:00
Rob Rix
1edde9c593
Construct algorithms in a free Applicative.
2016-09-25 15:27:59 +09:00
Rob Rix
8fd5675756
Safety first.
2016-09-24 16:46:50 +09:00
Timothy Clem
58d99a76c2
Accept --no-index to compare two paths
2016-09-23 15:46:52 -07:00
Timothy Clem
67103ea731
Remove determiner and category name for these boolean statements
2016-09-23 10:24:47 -07:00
Timothy Clem
ba3342585b
Improve phrasing for anonymous functions
2016-09-21 14:12:10 -07:00
Timothy Clem
43b8d73cc2
Merge branch 'master' of https://github.com/github/semantic-diff into improve-anonymous-function-summaries
2016-09-21 13:40:55 -07:00
Timothy Clem
a6741fc93e
Refactor out 'space' from 'maybeParentContext'
2016-09-21 13:25:58 -07:00
Timothy Clem
94b6ed7249
Lean into some succinct haskell
2016-09-21 13:15:31 -07:00
Timothy Clem
a3f53ec152
Print anonymous function parameters
2016-09-20 13:58:16 -07:00
Timothy Clem
3a04ffd85a
New maybeParentContext for updated assignment phrasing
2016-09-20 11:04:20 -07:00
Timothy Clem
bf2c5966ba
Merge branch 'master' of https://github.com/github/semantic-diff into improve-number-summaries
2016-09-20 08:01:37 -07:00
Timothy Clem
68bdde79e6
Simplify determiner method and usage
2016-09-19 18:27:29 -07:00
Timothy Clem
140bd7860b
Pattern match leaf in branches for correct use of 'the'
2016-09-19 17:39:30 -07:00
Timothy Clem
57271f30b7
Extraneous parans
2016-09-19 16:09:19 -07:00
Timothy Clem
b215b30130
Clean up commented out code
2016-09-19 15:33:35 -07:00
Timothy Clem
0b2f26a077
Merge remote-tracking branch 'origin/master' into improve-number-summaries
2016-09-19 13:08:15 -07:00
Timothy Clem
0b02fe171f
Remove un-used imports
2016-09-19 08:50:10 -07:00
Timothy Clem
9dbb004085
Merge remote-tracking branch 'origin/master' into remove-breakdown-leaves-by-word
2016-09-19 08:35:19 -07:00
Timothy Clem
946047f1fe
Handle droping 'the' for numbers
2016-09-19 08:30:09 -07:00
Rob Rix
d260ea19c9
Add a Semigroup instance over Source.
2016-09-18 09:54:07 +09:00
Rob Rix
38d6bbe644
Merge branch 'master' into ghc8
2016-09-17 20:45:58 -04:00
Josh Vera
74d541fa61
Merge branch 'master' into improved-math-and-bool-operators
2016-09-17 12:01:13 -04:00
Timothy Clem
195f158230
Merge branch 'master' into number-literal
2016-09-16 16:08:13 -07:00
Timothy Clem
eadde3b9a8
Introduce a MathOperator
2016-09-16 15:20:55 -07:00
Timothy Clem
a1250e7896
s/BinaryOperator/BooleanOperator
2016-09-16 15:20:36 -07:00
Timothy Clem
e699057650
Update toCategory name for Ternary
2016-09-16 13:33:57 -07:00
Josh Vera
7f4031bc34
Merge branch 'master' into markdown
2016-09-16 14:51:33 -04:00
joshvera
d67f240f90
indentation
2016-09-16 12:03:31 -04:00
joshvera
48ba980c6a
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-16 11:56:22 -04:00
joshvera
0535744ebc
more imports
2016-09-16 11:48:58 -04:00
joshvera
6665f0b6b1
remove imports
2016-09-16 11:36:45 -04:00
joshvera
f026a2d2f1
Replace cofree with Term and TermF
2016-09-16 11:22:52 -04:00
joshvera
86a38579cd
indentation
2016-09-16 11:08:21 -04:00
joshvera
fd91ffa2c8
Replace alias some types to Diff f (Record fields)
2016-09-16 10:47:30 -04:00
joshvera
4f7ec950a2
Some documentation tweaks
2016-09-16 10:40:26 -04:00
joshvera
b3776d9dc5
Clean up extraneous docs
2016-09-16 10:17:14 -04:00
joshvera
16aae4d95d
Move a few declarations into Prologue
2016-09-16 10:14:51 -04:00
joshvera
0713b7ce98
Import hylo and cata
2016-09-15 23:32:54 -04:00
joshvera
45e920c74d
Indentation and use term type alias
2016-09-15 23:26:17 -04:00
Rob Rix
2a62dd7bfc
Merge branch 'master' into ghc8
...
# Conflicts:
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/chained-ca
llbacks.json
2016-09-15 18:40:04 -04:00
Rob Rix
025502729d
Correct for precedence.
2016-09-15 17:54:33 -04:00
joshvera
3960697916
whitespace
2016-09-15 16:50:44 -04:00
joshvera
c7eeb1e075
Add TermOrIndexOrNil in place of a partial tuple of these and the term
2016-09-15 16:47:11 -04:00
joshvera
3c888c6650
Add fineNearestNeighbourToDiff in order to update the State indices for SES mapped terms
2016-09-15 16:39:22 -04:00
joshvera
ac398aaec6
Change move bound back to 2
2016-09-15 15:25:19 -04:00
Rob Rix
57a7a01b77
Merge branch 'master' into do-while-diff-summaries
...
# Conflicts:
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/chained-ca
llbacks.json
2016-09-15 15:04:33 -04:00
joshvera
24e02273d1
Clean up some insertDiff
2016-09-15 14:17:38 -04:00
joshvera
3d36d0fc59
Make sure isInMoveBounds is less than the sum of previous + defaultMoveBound
...
And change defaultMoveBound to 1
2016-09-15 14:09:23 -04:00
joshvera
61fe492616
Start at the lowest index in fas
2016-09-15 13:45:46 -04:00
joshvera
0abd720206
Recur into the tail if after is empty
2016-09-15 13:18:10 -04:00
joshvera
c26260057a
Use insertDiff to insert Theses in front of ambigous This and Thats
2016-09-15 13:12:48 -04:00
joshvera
f21420cb3d
Revert "Keep track of indices as Indices instead of These"
...
This reverts commit 5eacda831ecc80b9f8c1ca31babf4a7bcd33dcbd.
2016-09-15 12:01:00 -04:00
joshvera
169024f02e
Keep track of indices as Indices instead of These
2016-09-15 11:34:51 -04:00
Rob Rix
a66133e40f
Merge branch 'master' into markdown
2016-09-15 10:32:56 -04:00
Rob Rix
980f89505e
🔥 more redundant constraints/imports.
2016-09-14 19:28:13 -04:00
Rob Rix
996f9f5fa7
Define <> locally.
2016-09-14 19:26:41 -04:00
Rob Rix
aa240c4e63
🔥 a slew of redundant constraints.
2016-09-14 19:23:54 -04:00
Rob Rix
fc43dd54a0
🔥 a redundant import.
2016-09-14 19:23:40 -04:00
Rob Rix
795b6acbea
🔥 half a function I didn’t mean to commit 😬
2016-09-14 19:21:04 -04:00
Timothy Clem
4645bbda08
Remove breakDownLeavesByWord entirely
2016-09-14 15:02:37 -07:00
Rob Rix
25f4fa4bcb
Mergeable implies Functor.
2016-09-14 17:13:10 -04:00
Rob Rix
ed2395b952
🔥 a redundant constraint.
2016-09-14 17:09:50 -04:00
Rob Rix
6dee6cdde9
Deal with some semigroups fallout.
2016-09-14 16:51:43 -04:00
Rob Rix
2e28d0d582
Data.These has its own Arbitrary instance these days.
2016-09-14 16:42:01 -04:00
Rob Rix
9f93b1090c
Corecursive, not Unfoldable.
2016-09-14 16:40:25 -04:00
Rob Rix
1df89950ab
Correct a conflict that got committed.
2016-09-14 16:39:33 -04:00
Rob Rix
e4505a8be0
Protolude has traceShowId now apparently.
2016-09-14 16:33:33 -04:00
Rob Rix
62196878fa
Merge branch 'master' into ghc8
...
# Conflicts:
# semantic-diff.cabal
# src/Diff.hs
# src/Term.hs
# src/Term/Arbitrary.hs
# stack.yaml
# tools/semantic-git-diff/src/SemanticDiff.hs
2016-09-14 16:12:47 -04:00
joshvera
2d16172528
Add a compareTheseMonotone function to order insertions after deletions, and compare by index
2016-09-14 15:25:11 -04:00
joshvera
899906c1e5
Change index type from Int to These Int Int
2016-09-14 15:14:17 -04:00
joshvera
0ea1298f48
Insert SES diffs into their correct place
2016-09-14 14:58:11 -04:00
joshvera
2aed2534e9
Remove the double succ calls
2016-09-14 14:00:13 -04:00
joshvera
d1bf3d8aea
Change Index state back to -1 for insertions
2016-09-14 13:58:21 -04:00
joshvera
d5c04e209b
Cleanup lint messages
2016-09-14 13:31:36 -04:00
joshvera
1ba892e286
clean up eitherCutoff
2016-09-14 13:30:43 -04:00
joshvera
42e09d37fa
Remove traceShow of diff indices
2016-09-14 13:28:12 -04:00
joshvera
5a86fa09a8
Don't insert the entire diff at the cutoff, insert the sub-diff back in
2016-09-14 12:21:27 -04:00
joshvera
8dae819bcd
Set the index of the inserted term as the state and return its own index in insertion
2016-09-14 11:20:24 -04:00
joshvera
cc91bc27d5
Advance the index of the other side of the diffs twice when inserting an insertion or a deletion
2016-09-14 11:19:56 -04:00
joshvera
f6a3cbfa4f
Start index state from 0
2016-09-14 11:19:29 -04:00
Rob Rix
85bb9d577a
Revert "Move totalSpan into Source."
...
This reverts commit 3085a4efe5b6b3e8807df6a05db784afccab58e2.
2016-09-14 02:41:28 -04:00
Rob Rix
6b65574193
Correct the end column.
...
Oy vey.
2016-09-14 02:18:57 -04:00
Rob Rix
979abfefab
Avoid repeated Range computations.
2016-09-14 02:10:30 -04:00
Rob Rix
4a06d76054
Move cmarkParser to its own module.
2016-09-14 02:08:27 -04:00
Rob Rix
88865f2c09
Traverse nodes within their parent spans.
2016-09-14 02:04:38 -04:00
Rob Rix
da19d6672e
Use totalSpan to define errorNode.
2016-09-14 01:58:38 -04:00
Rob Rix
6317228466
Move totalSpan into Source.
2016-09-14 01:57:51 -04:00
Rob Rix
f30fe7b358
Trim out nodes without positions.
2016-09-14 01:56:25 -04:00
Rob Rix
89a769ca35
Convert between 0- and 1-indexed spans.
2016-09-14 01:45:17 -04:00
Rob Rix
27d4cc0775
🔥 an obsolete comment.
2016-09-14 01:44:52 -04:00
Rick Winfrey
8ccf703f5f
Update identifiable term to include MethodCall and DoWhile syntaxes constructors
...
- Unifies isIdentifiable and identifiable functions because
isIdentifiable is never applied on its own.
- Use lambda case and return partially constructed Identifiables.
2016-09-13 17:54:05 -05:00
Timothy Clem
5caee16318
Use ellipsis for Unidentifiable too
2016-09-13 12:45:00 -07:00
Rob Rix
baba6eec73
🔥 the unused outputPath field from DiffArguments.
2016-09-13 15:40:53 -04:00
Rob Rix
12302e17ed
Compute a Range for Markdown nodes.
2016-09-13 15:17:27 -04:00
Rob Rix
953bf3ba58
Stop hiding ++
, Source doesn’t export it any more.
2016-09-13 15:09:55 -04:00
Rob Rix
85fdc3a807
Correct the computation of the end index.
2016-09-13 15:04:25 -04:00
Rob Rix
03f3cc01d3
Abstract how lengths are summed.
2016-09-13 12:25:55 -04:00
Rob Rix
66f5d39021
Compute the end index.
2016-09-13 12:24:47 -04:00
Rob Rix
07247e83c0
Compute the start index.
2016-09-13 12:23:47 -04:00
Rob Rix
7dc8393953
📝 sourceSpanToRange.
2016-09-13 12:00:41 -04:00
Rob Rix
4603cea555
Stub in a SourceSpan -> Range conversion.
2016-09-13 11:58:55 -04:00
Rob Rix
2f0bd6d81f
nl at eof
2016-09-13 11:56:32 -04:00
Rob Rix
561d03b6ba
🔥 Source’s definition of ++.
2016-09-13 11:45:30 -04:00
Rob Rix
d7a3747545
Define mappend without reference to Source.++.
2016-09-13 11:44:18 -04:00
Timothy Clem
362859c315
Use ellipsis instead of ...
2016-09-13 08:37:51 -07:00
Rob Rix
587cb66ef9
Placate hlint.
2016-09-13 10:41:45 -04:00
Rob Rix
161d98521e
Placate -Werror.
2016-09-13 10:41:36 -04:00
Rob Rix
b4e6e1dbb8
Merge branch 'master' into markdown
2016-09-13 10:35:28 -04:00
Timothy Clem
68d932594e
Add in NumberLiteral category
2016-09-12 21:06:53 -07:00
Josh Vera
6b9d944b06
Merge branch 'master' into summarizing-pairs
2016-09-12 21:44:40 -04:00
Timothy Clem
1067aa02ca
Give object representation some spacing
2016-09-12 15:52:00 -07:00
Timothy Clem
03915ffb62
Only print key in Pair
2016-09-12 15:51:33 -07:00
Timothy Clem
5958cb5818
Start to print out arg name for pair value
2016-09-12 15:31:31 -07:00
joshvera
d3440439dc
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-12 14:55:20 -04:00
joshvera
ff118abf93
Add docs
2016-09-12 14:41:56 -04:00
joshvera
ab728fade1
s/a/leaf
2016-09-12 13:43:38 -04:00
Rob Rix
902a3f20d8
🔥 a redundant import.
2016-09-12 13:43:23 -04:00
Rob Rix
2b933904c9
Add specializations of Term/TermF/Diff/DiffF/SplitDiff over Syntax/Record.
2016-09-12 13:40:22 -04:00
Rob Rix
a64775d214
Merge branch 'master' into abstract-the-functor-out-of-diff-and-term-type-synonyms
2016-09-12 09:05:20 -04:00
Rob Rix
72741b51c2
Merge branch 'master' into template-strings
2016-09-09 17:34:31 -04:00
Rick Winfrey
773308af9a
Prevent TemplateString Leaf nodes from being broken down by word
2016-09-09 16:23:54 -05:00
Rick Winfrey
67d5bec5ff
Format comment
2016-09-09 16:23:19 -05:00
joshvera
7bdf389481
Remove unused Eq annotation constraint
2016-09-09 14:54:42 -04:00
joshvera
dbb687b33e
Split Term and Diff into SyntaxTerm and SyntaxDiff types as well
2016-09-09 14:51:20 -04:00
Rob Rix
98637ad656
Generalize Term/TermF & Diff/DiffF over the functor.
2016-09-09 14:46:50 -04:00
joshvera
4b7f767918
Add UnmappedTerms and move Cofree f Record fields into UnmappedTerm to clean up types
2016-09-09 12:52:09 -04:00
joshvera
d3b6b8476a
Add type to insertion
2016-09-09 12:41:56 -04:00
joshvera
d3ad6940fc
s/kv/term
2016-09-09 12:36:48 -04:00
joshvera
e79c7a00a2
Indent findNearestNeighourTo type
2016-09-09 12:35:51 -04:00
joshvera
cce8cb66ec
Rename to sesDiffs
2016-09-09 12:13:24 -04:00
joshvera
2fc783893a
Trace the indices
2016-09-08 17:50:58 -04:00
joshvera
91646fae53
append SES diffs to RWS diffs and sort on their indices
2016-09-08 17:24:44 -04:00
joshvera
b51198393e
Prepend the diff if it's not a deletion/insertion
2016-09-08 17:13:32 -04:00
joshvera
f16874fe6c
Fold cutoff SES diffs together so we can run them through RWS later
2016-09-08 16:58:08 -04:00
Rick Winfrey
f00162f9c1
Readability changes
2016-09-08 15:22:31 -05:00
Rick Winfrey
92b243d454
Indentation
2016-09-08 15:22:05 -05:00
joshvera
f2ccad84c5
Remove hashDecorator
2016-09-08 15:18:08 -04:00
joshvera
6947c8cf9f
Remove Int constraint
2016-09-08 15:13:51 -04:00
joshvera
10de2b957d
Remove pqueue and xydiff stuff
2016-09-08 14:19:45 -04:00
joshvera
ace71c1471
Try a cutoff on each SES diff
2016-09-08 13:17:50 -04:00
joshvera
37f47b4030
Formatting
2016-09-08 12:42:15 -04:00
joshvera
45320eb1f7
Formatting
2016-09-08 12:40:51 -04:00
Rob Rix
d9cc6c324e
Merge branch 'master' into almost-pedantic-builds
2016-09-08 12:40:15 -04:00
joshvera
109cca099e
Add ghc-mod to stack.yaml so atom versions don't get out of sync
2016-09-08 12:40:01 -04:00
Rob Rix
bb6fba4a95
Drop the Args node from function calls.
2016-09-08 12:24:47 -04:00
joshvera
bc69a5efc4
Merge remote-tracking branch 'origin/master' into rws-large-diffs
2016-09-08 12:04:29 -04:00
Rob Rix
38abf6b339
Merge branch 'master' into abstract-term-construction-out-of-parsing
...
# Conflicts:
# src/Parser.hs
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/switch-sta
tement.json
#
tools/semantic-git-diff/test/corpus/diff-summaries/javascript/throw-stat
ement.json
2016-09-08 09:52:01 -04:00
Rob Rix
29e5b5d1da
Filter empty nodes out at the assignment of children.
2016-09-08 09:42:16 -04:00
Rob Rix
eccaab1fbd
Use record wildcards to destructure the source blob.
2016-09-08 09:40:00 -04:00
Rob Rix
8ff6b1aa96
Use $! instead of seq.
2016-09-08 09:39:19 -04:00
Rob Rix
e4a37940c0
Indent all the things.
2016-09-08 09:30:53 -04:00
Rob Rix
67fcf6c7de
Handle errors and all in a single clause.
2016-09-08 09:29:01 -04:00
joshvera
648b61a94f
Add doc to editDistanceUpTo
2016-09-07 19:46:23 -04:00
Timothy Clem
9661cad15f
Fix a couple of new warnings
2016-09-07 15:27:31 -07:00
Timothy Clem
4600436167
Merge remote-tracking branch 'origin/master' into almost-pedantic-builds
2016-09-07 15:24:41 -07:00
joshvera
6c09ff32be
Add comma_operator split Category
2016-09-07 15:00:49 -07:00
Rob Rix
1e9785fc67
Add a fallback term constructor for other languages.
2016-09-07 15:14:20 -04:00
Rob Rix
a1be4c2841
Map C productions into terms using a term constructor.
2016-09-07 15:11:55 -04:00
Rob Rix
cccd9e9cc6
Stub in a term constructor for C.
2016-09-07 15:10:49 -04:00
Rob Rix
fe7b83663a
Handle all the for statements in a single case.
2016-09-07 14:19:54 -04:00
Rob Rix
7a61659b5c
Support for_statement.
2016-09-07 14:17:23 -04:00
Rob Rix
c1f0854962
Handle the terminal comma operator case correctly.
2016-09-07 13:48:00 -04:00
Rob Rix
a01f704d6b
Resume setting the category on variable declarations.
2016-09-07 13:36:34 -04:00
Rob Rix
c194d4578a
Select the term constructor using the language.
2016-09-07 13:00:59 -04:00
Rob Rix
13527a035c
🔥 the old termConstructor function.
2016-09-07 12:25:09 -04:00
Rob Rix
baacee4ef9
Add operator support back in.
2016-09-07 12:11:21 -04:00
Rob Rix
9750b252ed
Rename the term constructor for JS.
2016-09-07 11:57:24 -04:00
Rob Rix
0c0a67ba65
Move javascriptTermConstructor into its own module.
2016-09-07 11:56:28 -04:00
Rob Rix
64edd14b1d
Stub in a module for JS-specific stuff.
2016-09-07 11:50:41 -04:00
Rob Rix
bd7fab0cd8
🔥 defaultCategoryForNodeName.
2016-09-07 10:31:58 -04:00
Rob Rix
18bcc8bd0c
🔥 categoriesForLanguage.
2016-09-07 10:31:52 -04:00
Rob Rix
71272090af
Merge branch 'master' into abstract-term-construction-out-of-parsing
2016-09-07 10:30:48 -04:00
Rob Rix
8fca7294d9
Don’t change the category in toVarDecl.
2016-09-07 09:16:41 -04:00
joshvera
fb8b0a8543
Add comma_operator split Category
2016-09-06 19:29:14 -04:00
joshvera
e7e4899691
Run SES before RWS
2016-09-06 18:03:30 -04:00
Rick Winfrey
59ee8eb002
Update constructor-call JSONTestCases
2016-09-06 16:07:21 -05:00
Rick Winfrey
fb8011e552
Merge branch 'enhance-test-case-generator' into display-function-call-args
2016-09-06 10:38:20 -05:00
joshvera
ca9eca1cf8
Remove Comment
2016-09-01 19:22:14 -04:00
joshvera
d16cdefe34
Keep a hash for every node instead of a vector
2016-09-01 16:58:24 -04:00
joshvera
daba1fb2ef
Drop equal terms before running rws
2016-09-01 15:41:09 -04:00
joshvera
a809a95c81
Annotate terms with hashes and stick the terms in a priority queue
2016-09-01 15:01:40 -04:00
joshvera
44892e4761
Use naive hash function for now
2016-09-01 14:33:24 -04:00
joshvera
271cb702e6
export hashDecorator
2016-09-01 14:31:23 -04:00
joshvera
b26e445081
Move pqGramDecorator under featureVectorDecorator
2016-09-01 13:04:02 -04:00
joshvera
bc5283cb53
Move unitVector under featureVectorDecorator
2016-09-01 13:03:25 -04:00
joshvera
7708985f12
Add hashDecorator
2016-09-01 13:02:05 -04:00
joshvera
2723b657a4
Derive Hashable for SourcePos, SourceSpan, and Syntax
2016-09-01 12:10:35 -04:00
Rick Winfrey
2ad87cd022
🔥 extra space
2016-08-31 16:57:32 -05:00
joshvera
05ab760f14
Add notes for xydiff + RWS
2016-08-31 16:20:38 -04:00
Rick Winfrey
a78a9be087
Move args smart constructor function to Arguments module
2016-08-31 15:11:33 -05:00
Rick Winfrey
b07d4d2cdf
Extract Arguments to its own module
2016-08-31 13:09:41 -05:00
Rob Rix
4533f13973
Stub in Markdown parsing using CMark.
2016-08-29 13:58:52 -04:00
Rob Rix
d006d4b64f
.md files are Markdown.
2016-08-29 12:48:26 -04:00
Rob Rix
3399702d0a
Add Markdown to Language.
2016-08-29 12:47:55 -04:00
Rick Winfrey
dbd118d734
Merge branch 'master' into display-function-call-args
2016-08-26 18:15:12 -05:00
Rick Winfrey
fdd56cc67d
🔥 hasIdentity and dependency on Category
...
We should use Syntax because we cannot guarantee that a given term’s
category will always match or correspond with its Syntax.
We also plan to move away from using Category all together, and relying
on Category here would only add more more work for us in the future.
2016-08-26 17:59:26 -05:00
Rick Winfrey
bf888f52f9
Add newlines for easier readability (and easier vim'ing)
2016-08-26 17:57:48 -05:00
Rick Winfrey
0c82459b84
Reuse identifiable constructor function for prependSummary
2016-08-26 14:43:55 -05:00
Rick Winfrey
4f2ec3c00d
Update method call syntax terms to use toArgName
when determining term names
2016-08-26 14:43:31 -05:00
Rick Winfrey
e8d3132696
Add identifiable constructor function
2016-08-26 14:42:25 -05:00
Rick Winfrey
8bda7645ee
Add Identifiable data type
2016-08-26 14:42:09 -05:00
joshvera
1d7bd1777e
Don't drop summaries from a Commented node's child term
2016-08-26 12:42:01 -04:00
Rick Winfrey
986d88e540
Add toArgName for function call args
2016-08-25 17:48:00 -05:00
Rob Rix
b5534682a8
Construct in javascriptTermConstructor.
2016-08-25 18:20:40 -04:00
Rob Rix
a32d410e8d
Construct method calls with the appropriate category name.
2016-08-25 18:15:21 -04:00
Rob Rix
0412660a68
Construct errors.
2016-08-25 18:15:09 -04:00
Rob Rix
7f122d357d
Construct classes.
2016-08-25 18:15:04 -04:00
Rob Rix
b54ddad3ab
Construct method definitions.
2016-08-25 18:15:00 -04:00
Rob Rix
5573a4104d
Construct array literals.
2016-08-25 18:14:52 -04:00
Rob Rix
92b9ccf318
Construct try/catch/finally statements.
2016-08-25 18:14:46 -04:00
Rob Rix
2b9fd26641
Construct constructors.
2016-08-25 18:14:34 -04:00
Rob Rix
f3609ce45a
Construct throw statements.
2016-08-25 18:14:28 -04:00
Rob Rix
d1e3b660a7
Construct do/while statements.
2016-08-25 18:14:24 -04:00
Rob Rix
d9c3a8a368
Construct while statements.
2016-08-25 18:14:18 -04:00
Rob Rix
2d84d69072
Construct for statements.
2016-08-25 18:14:12 -04:00
Rob Rix
643b038636
Construct if & if/else statements.
2016-08-25 18:14:06 -04:00
Rob Rix
10a8a85b5f
Construct pairs.
2016-08-25 18:13:54 -04:00
Rob Rix
75c120fad7
Construct object literals.
2016-08-25 18:13:50 -04:00
Rob Rix
e0b8c126ce
Construct case statements.
2016-08-25 18:13:45 -04:00
Rob Rix
901e7e7d31
Construct switch statements.
2016-08-25 18:13:40 -04:00
Rob Rix
65b5eaa081
Construct variable declarations.
2016-08-25 18:13:35 -04:00
Rob Rix
48fdd44d7c
Construct variable assignments.
2016-08-25 18:13:30 -04:00
Rob Rix
f45cbbbcfa
Construct arguments.
2016-08-25 18:13:25 -04:00
Rob Rix
e839e47ef4
Construct ternaries.
2016-08-25 18:13:20 -04:00
Rob Rix
91f15df0fd
Construct function/method calls.
2016-08-25 18:12:56 -04:00
Rob Rix
108061eb7b
Construct function definitions.
2016-08-25 18:12:18 -04:00
Rob Rix
6e76518348
Correct how switch statements are constructed.
2016-08-25 17:44:49 -04:00
Rob Rix
bc85108428
Construct comma operators.
2016-08-25 16:46:11 -04:00
Rob Rix
f3fd55108e
Construct leaf nodes.
2016-08-25 16:45:26 -04:00
Rob Rix
162ef460e8
Construct subscript accesses.
2016-08-25 16:43:18 -04:00
Rob Rix
d2188d58da
Construct member accesses.
2016-08-25 16:43:13 -04:00
Rob Rix
c407863787
Construct math assignments.
2016-08-25 16:41:39 -04:00
Rob Rix
0aaf176c5c
Pattern match on the name and children simultaneously.
2016-08-25 16:40:33 -04:00
Rob Rix
1fac7cba4b
Map assignments.
2016-08-25 16:38:35 -04:00
Rob Rix
50ce18e421
Copy the categories for JS productions into Parser.
2016-08-25 16:35:58 -04:00
Rob Rix
1fa9a9d133
Stub in a term constructor over production names.
2016-08-25 16:32:01 -04:00
Rob Rix
2121dd3071
🔥 ScopedTypeVariables.
2016-08-25 16:25:06 -04:00
Rob Rix
3416e4b350
Simplify CommaOperator handling.
2016-08-25 16:16:09 -04:00