1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
Commit Graph

837 Commits

Author SHA1 Message Date
Rob Rix
b0aae13648 Unwrap TermFs recursively. 2017-05-09 13:48:55 -04:00
Rob Rix
1474c63c12 Pass the term functor to identifierFor. 2017-05-09 13:43:39 -04:00
Rob Rix
0a522a386d Don’t pattern match against the term functor. 2017-05-09 13:39:49 -04:00
Rob Rix
118e94a2a7 Merge branch 'master' into generalize-table-of-contents-over-the-syntax-functor 2017-05-09 13:21:49 -04:00
Rob Rix
3c6d311255 🔥 a type signature mentioning Syntax. 2017-05-09 12:51:26 -04:00
Rob Rix
dde54fed6f Move diffSource into the where clause. 2017-05-09 12:44:02 -04:00
Rob Rix
fd3dded127 Extract toInfo to the top level (again). 2017-05-09 12:40:18 -04:00
Rob Rix
a4a2425ada Use a single code path for diff/term source. 2017-05-09 12:09:02 -04:00
Rob Rix
e578772376 More straightforward computation of the source for a given diff/term. 2017-05-09 12:04:25 -04:00
Rob Rix
58ed93f559 Don’t call toTermName for Pure nodes. 2017-05-09 11:58:35 -04:00
Rob Rix
a3ac8c308a Don’t call toTermName for Free nodes. 2017-05-09 11:56:03 -04:00
Rob Rix
490820c79d 🔥 InSummarizable. 2017-05-09 11:16:17 -04:00
Rob Rix
d38b76f554 Reformat TOCSummary a bit further. 2017-05-09 11:13:17 -04:00
Rob Rix
c08bfe5e07 Represent parse errors with Nothing. 2017-05-09 11:08:18 -04:00
Rob Rix
239105b5fe Combine DiffInfo’s constructors. 2017-05-09 11:02:15 -04:00
Rob Rix
fd618537a4 Clean up how we summarize leaf infos. 2017-05-09 10:28:16 -04:00
Rob Rix
901b67ca53 Factor the TOCSummary construction out. 2017-05-09 10:26:32 -04:00
Rob Rix
636b51ed92 Reformat TOCSummary. 2017-05-09 10:07:21 -04:00
Rob Rix
af5db72165 Tighten up labelling dupes. 2017-05-09 10:06:14 -04:00
Rob Rix
41e205639f Simpler term name computation. 2017-05-08 17:41:59 -04:00
Rob Rix
e1093344a7 Simplify contextualization. 2017-05-08 17:39:21 -04:00
Rob Rix
c369867230 Simplify toJSONSummaries. 2017-05-08 17:16:48 -04:00
Rob Rix
28d858ce32 Use record syntax for every case in toInfo. 2017-05-08 17:14:21 -04:00
Rob Rix
f33f2d6622 Flatten various branches with foldMap. 2017-05-08 17:11:03 -04:00
Rob Rix
ac832e9e4c fmap with fewer parens. 2017-05-08 17:09:37 -04:00
Rob Rix
48457f13cc s/toTOCSummaries/summarize/ 2017-05-08 16:52:03 -04:00
Rob Rix
a9b7903d8e Contextualize ToC summaries in a foldMap. 2017-05-08 16:41:10 -04:00
Rob Rix
f41a5f120b 🔥 BranchInfo. 2017-05-08 16:00:29 -04:00
Rob Rix
51d548cb0a 🔥 flattenPatch.
traverse has different semantics, but I’m pretty sure the zipWith was problematic.
2017-05-08 15:50:13 -04:00
Rob Rix
967ded76a8 Move toTOCSummaries & termToDiffInfo into diffTOC. 2017-05-08 15:47:51 -04:00
Rob Rix
9750fa35ec Map patches to ToC summaries without a second pass. 2017-05-08 15:20:22 -04:00
Rob Rix
03fc463c5c Format Summarizable across several lines. 2017-05-08 15:11:12 -04:00
Rob Rix
2d6c485ace Tighten up how we compute the summary key. 2017-05-08 13:21:40 -04:00
Rob Rix
d74c5fc2d2 🔥 ScopedTypeVariables. 2017-05-08 11:37:20 -04:00
Rob Rix
60782087de 🔥 a redundant forall. 2017-05-08 11:37:10 -04:00
Rob Rix
cba78c805f Specialize the leaf type. 2017-05-08 11:36:45 -04:00
Rob Rix
92be6ee6d1 Use the full types diffs & terms. 2017-05-08 11:35:34 -04:00
Rob Rix
b3fcde2abb Avoid indirection for error summaries. 2017-05-08 11:32:25 -04:00
Rob Rix
3cede7da09 Represent NotSummarizable as Nothing. 2017-05-08 11:31:30 -04:00
Rob Rix
821b598e2a Further tighten toTermName. 2017-05-08 11:24:25 -04:00
Rob Rix
6e411c7c85 Compute toTermName as a paramorphism. 2017-05-08 11:22:04 -04:00
Rob Rix
1b487b6907 🔥 offsetting in toTermName.
toTermName is a shallow traversal, so there’s little or no point in offsetting before recursive calls.
2017-05-08 11:18:23 -04:00
Rob Rix
2e98b4570d Contextualize summaries in diffToTOCSummaries directly. 2017-05-08 11:16:37 -04:00
Rob Rix
9df2a73e38 Tighten up toTermName. 2017-05-08 11:16:23 -04:00
Rob Rix
76002f08c0 🔥 redundant parens. 2017-05-08 09:56:11 -04:00
Rob Rix
f3cf3cb1d1 🔥 SummarizableTerm. 2017-05-08 09:55:56 -04:00
Rob Rix
4274fdf6e3 Merge branch 'master' into generalize-alignment-over-the-syntax-functor 2017-05-08 08:28:01 -04:00
Rob Rix
8d8fa78b47 Simplify summarizable. 2017-05-05 16:34:16 -04:00
Rob Rix
0c7af370f7 Define termToDiffInfo as a paramorphism. 2017-05-05 16:28:46 -04:00
Rob Rix
c73a79eb83 No need to qualify sourceSpan. 2017-05-05 16:19:49 -04:00
Rob Rix
a55b97b017 Use the named field accessor. 2017-05-05 16:08:51 -04:00
Rob Rix
2491dde0f9 Don’t bind the individual info functions. 2017-05-05 16:00:52 -04:00
Rob Rix
e667657d94 Bind the diff info functions at the top level. 2017-05-05 16:00:10 -04:00
Rob Rix
b6cc1cfac1 🔥 redundant parens. 2017-05-05 15:56:15 -04:00
Rob Rix
628bf46ed3 Don’t bind syntax. 2017-05-05 15:56:04 -04:00
Rob Rix
274095720b Tighten up diffToTOCSummaries. 2017-05-05 15:54:38 -04:00
Rob Rix
f820af4f5a Factor the application of toLeafInfos out. 2017-05-05 15:48:54 -04:00
Rob Rix
c3f510f83d Rename toLeafInfos' to toLeafInfos. 2017-05-05 15:45:51 -04:00
Rob Rix
c6b49cba94 Simplify the termToDiffInfo definition by closing over the source. 2017-05-05 15:44:37 -04:00
Rob Rix
0ab53b002a Flatten toTOCSummaries. 2017-05-05 15:33:16 -04:00
Rob Rix
8cd74f6ea2 afterOrBefore always returns a value. 2017-05-05 15:26:26 -04:00
Timothy Clem
1959301204 Use a list to simplify json output concatenation 2017-05-05 09:09:45 -07:00
Timothy Clem
2b4d4a0e85 Bring back original json structure with 'sourceRange' and identifier only on specific nodes 2017-05-05 09:08:58 -07:00
Rob Rix
f14cd97cae Merge branch 'master' into generalize-alignment-over-the-syntax-functor 2017-05-05 10:56:23 -04:00
Timothy Clem
e53a8342a3 Missing one case for this monoid instance to be associative 2017-05-05 07:52:14 -07:00
Rob Rix
bee7d1ee6a Merge branch 'master' into fix-json-output 2017-05-05 09:06:30 -04:00
Timothy Clem
bea5d66f3f Bit more nuanced of a monoid instance for Value 2017-05-04 14:56:53 -07:00
Timothy Clem
477165a4c2 Collapse up and remove unused language extensions 2017-05-04 14:56:08 -07:00
Rob Rix
231abd6cb5 Generalize alignment over the syntax functor. 2017-05-04 17:31:45 -04:00
Rob Rix
68b813d51b Merge branch 'master' into 🔥-split-renderer 2017-05-04 10:59:21 -04:00
Rob Rix
9c2b7dfbe0 🔥 Renderer.Split. 2017-05-04 10:10:45 -04:00
Timothy Clem
31c01c0092 Give sExpressions output a trailing newline again 2017-05-03 14:11:37 -07:00
Rob Rix
363d21b607 Generalize s-expression rendering to arbitrary Foldables. 2017-05-03 13:43:32 -04:00
Rob Rix
da22bee49e Group SourceSpan fields together. 2017-04-28 11:35:50 -04:00
Rob Rix
285fb8f3a7 🔥 the unused ToJSON instances for Category and Range. 2017-04-28 09:25:12 -04:00
Rob Rix
026f855f0b Move indexing out of the JSON renderer. 2017-04-27 19:42:55 -04:00
Rob Rix
4334e24aa4 Replace the indexing renderer with an indexing operation. 2017-04-27 19:40:54 -04:00
Rob Rix
6ed683f9be 🔥 jsonParseTree. 2017-04-27 19:38:18 -04:00
Rob Rix
4975dc61fe Move decoration of terms out of the JSON renderer. 2017-04-27 19:36:35 -04:00
Rob Rix
013d998ef3 Extract a common handler for path-annotated rendering. 2017-04-27 19:27:03 -04:00
Rob Rix
9944b32d9f Define a ToJSONFields instance for SourceText. 2017-04-27 19:22:22 -04:00
Rob Rix
59735e5dac Don’t pass the debug flags to the renderers. 2017-04-27 19:13:18 -04:00
Rob Rix
63b30ac1a3 Render parse trees/indices’ records to JSON. 2017-04-27 18:56:41 -04:00
Rob Rix
862fb3654b Define a ToJSONFields instance for SourceSpan. 2017-04-27 18:51:41 -04:00
Rob Rix
70dd381f26 Simplify the ToJSONFields instance for Syntax. 2017-04-27 18:28:52 -04:00
Rob Rix
fed06ff0e1 Define ToJSONFields instances for Free & FreeF. 2017-04-27 18:23:10 -04:00
Rob Rix
3bf4f63e0c Define a ToJSONFields instance for CofreeF. 2017-04-27 18:17:05 -04:00
Rob Rix
607d4f0398 Define a ToJSONFields instance for SplitPatch. 2017-04-27 18:10:31 -04:00
Rob Rix
1520fb0c2b Replace syntaxToTermField with a ToJSONFields instance. 2017-04-27 18:10:12 -04:00
Rob Rix
43a5580bf5 Define a ToJSONFields instance for Terms. 2017-04-27 18:05:08 -04:00
Rob Rix
5afd5b8fa6 Distribute ToJSONFields through Maybe. 2017-04-27 17:56:24 -04:00
Rob Rix
5beff62cbc Define ToJSONFields instances for Range and Category. 2017-04-27 17:53:36 -04:00
Rob Rix
adf868e5c8 Add a class to produce JSON fields for a type. 2017-04-27 17:49:37 -04:00
Rob Rix
17d413d267 Get all the fields uniformly. 2017-04-27 16:58:39 -04:00
Rob Rix
a5a86b33ea Don’t pass the syntax around. 2017-04-27 16:58:13 -04:00
Rob Rix
96d2ccf92e Decorate the term with the identifier algebraically. 2017-04-27 16:57:47 -04:00
Rob Rix
4abace2490 🔥 an unnecessary Functor constraint. 2017-04-27 16:47:08 -04:00
Rob Rix
f0b89c508c 🔥 parseDecorator. 2017-04-27 16:21:06 -04:00
Rob Rix
9dac0260e3 🔥 Identifier. 2017-04-27 16:18:11 -04:00
Rob Rix
76513638a6 Merge branch 'master' into clean-parse-and-diff-interface 2017-04-24 14:56:06 -04:00
Timothy Clem
77b9b6f909 Few doc fixes 2017-04-24 09:17:28 -07:00
Timothy Clem
779b6afde2 No longer need printTerms 2017-04-21 17:54:58 -07:00
Timothy Clem
78d376e256 Pair down command to just fs and git operations 2017-04-21 13:56:19 -07:00
Rob Rix
b99944556c Merge branch 'master' into run-assignment-with-source 2017-04-21 16:18:16 -04:00
Rob Rix
e3192150e2 Define take & drop functions for Source. 2017-04-21 13:36:41 -04:00
Timothy Clem
19e87dd523 Put both diff and parse rendering back together 2017-04-20 15:13:28 -07:00
Timothy Clem
389bfaf220 WIP - new renderer achitecture 2017-04-20 11:00:02 -07:00
Timothy Clem
04f7f4b1f5 Start to build new interface for semantic 2017-04-19 16:33:27 -07:00
Timothy Clem
e9edb42e53 Remove render formats and use render/encode functions directly 2017-04-10 15:10:24 -07:00
Rob Rix
fbb899250a Replace the summaries maps with Summaries. 2017-04-03 17:15:58 -04:00
Rob Rix
4c24cdf1ad 🔥 TOC’s dependency on Renderer. 2017-03-31 16:48:06 -04:00
Rob Rix
b30c19e68b 🔥 JSON’s dependency on Renderer. 2017-03-31 16:37:16 -04:00
Rob Rix
45b34c7444 🔥 Summary’s dependency on Renderer. 2017-03-31 16:37:08 -04:00
Rob Rix
5ee44d4642 🔥 Patch’s dependency on Renderer. 2017-03-31 16:20:48 -04:00
Rob Rix
fd2b24b714 🔥 Split’s dependency on Renderer. 2017-03-31 16:17:20 -04:00
Rob Rix
92092f6136 SExpression does not import Renderer. 2017-03-31 16:12:26 -04:00
Rob Rix
f52894d2e8 Rename DefaultFields to HasDefaultFields. 2017-03-31 15:18:27 -04:00
Rob Rix
46fe5ed705 Move DefaultFields into Info.hs. 2017-03-31 15:17:43 -04:00
joshvera
81e178fc61 Keep track of clauses before a Method identifier 2017-03-30 18:00:13 -04:00
joshvera
b5f9938279 Remove ty from Method and throw every part of a call signature into a list 2017-03-29 16:24:54 -04:00
joshvera
cdbd260b0f Remove type from Function and unpack call signatures 2017-03-29 12:36:05 -04:00
joshvera
461b1c665b Merge remote-tracking branch 'origin/master' into typescript 2017-03-29 10:17:53 -04:00
joshvera
ad68312273 Allow type parameters in function and method calls 2017-03-28 18:55:57 -04:00
joshvera
0058c371ec Map template_chars in JS and add missing Interface cases 2017-03-28 16:10:37 -04:00
joshvera
9c5e73897b Add interfaces 2017-03-28 15:54:31 -04:00
joshvera
f86d43a6e5 Add namespace mapping 2017-03-28 15:43:21 -04:00
Rob Rix
a8410e8829 🔥 various uses of LambdaCase. 2017-03-28 15:32:45 -04:00
joshvera
01a8087b0a Map public_field_definition to FieldDecl and fix up VarDecl and VarAssignment mappings 2017-03-28 13:00:15 -04:00
joshvera
d05e297084 Relax VarDecl and VarAssignment constraints 2017-03-27 16:28:37 -04:00
joshvera
129da112b3 Map yield expression, lexical declaration and assignment pattern 2017-03-16 16:36:19 -04:00
Rick Winfrey
d0c66f1921 Add newline to end of output in one place 2017-03-13 10:52:00 -07:00
Timothy Clem
569fdd031b Construct sexpression output with ByteString 2017-03-08 11:40:37 -08:00
Timothy Clem
3647e740f7 Render sexpression output as ByteString 2017-03-07 14:08:32 -08:00
Timothy Clem
dcfdcf78d3 Fold DiffSummary into Renderer.Summary 2017-02-28 14:09:57 -08:00
Timothy Clem
e3bdb6b95b Extract SemanticDiff.IO and clearly delineate program commands 2017-02-28 13:43:01 -08:00
Timothy Clem
0cf38c583c Assert to summary json output 2017-02-22 20:05:48 -08:00
Timothy Clem
f9c26b3ae4 Merge remote-tracking branch 'origin/master' into sexpression-text-based-testing 2017-02-22 15:08:14 -08:00
Timothy Clem
a3331c08e7 Assert parsing 2017-02-22 08:34:31 -08:00
Timothy Clem
6165a6dd02 Allow printing only tree of sexpression output 2017-02-22 08:34:31 -08:00
Rob Rix
67b162895c 🔥 costs from Split output. 2017-02-21 14:48:03 -05:00
Timothy Clem
9910f8dd16 Add friendly category name now that we have singleton methods 2017-02-17 14:57:29 -08:00
Timothy Clem
6e718a7804 No opening linebreak if first node is a patch 2017-02-17 13:54:20 -08:00
Josh Vera
696e4f6a8c Merge branch 'master' into ruby-singleton-methods 2017-02-17 15:02:32 -05:00
Josh Vera
d0af7a2f40 Merge branch 'master' into it-slices,-it-dices 2017-02-17 14:52:42 -05:00
Timothy Clem
91c650ee9c Minor fix for sexpression padding on the Pure side 2017-02-17 11:36:50 -08:00
Timothy Clem
a10bc515c0 ++tree-sitter-ruby and parse singleton methods to fix ambiguity 2017-02-17 11:34:47 -08:00
Rob Rix
75d3fc5079 🔥 stale hiding of fromList. 2017-02-16 14:28:32 -05:00
Rob Rix
a7bfbb72f4 Rename characterRange to byteRange. 2017-02-16 11:58:26 -05:00
Timothy Clem
70c8e2a57b Property test that toc summarizes methods and functions 2017-02-15 16:13:34 -08:00
Timothy Clem
b34c71dcc5 Merge branch 'master' into dedupe-added-removed-methods 2017-02-15 08:14:21 -08:00