1
1
mirror of https://github.com/github/semantic.git synced 2025-01-08 08:30:27 +03:00
Commit Graph

4760 Commits

Author SHA1 Message Date
Rob Rix
b12aa44636 Replace the quaternary ToJSON instance over Record with an inductive one. 2017-01-12 14:23:36 -05:00
Rob Rix
3124447ad6 Define ToJSONList instances over records. 2017-01-12 14:23:18 -05:00
Rob Rix
a044e862b2 Define a typeclass for computing a record’s component Values. 2017-01-12 14:23:03 -05:00
Rick Winfrey
3a7259503d Add FieldDecl renderer entries 2017-01-11 15:26:56 -08:00
Rick Winfrey
ad9895a28c Merge branch 'more-go-terms' of github.com:github/semantic-diff into more-go-terms 2017-01-11 15:23:04 -08:00
Rick Winfrey
4bddf7952a Summarize FieldDecl 2017-01-11 15:10:45 -08:00
Rick Winfrey
24e8e87cd5 Make TypeDecl identifiable but not Struct 2017-01-11 15:10:28 -08:00
Rick Winfrey
2bb7ec94ac Add field declaration mapping 2017-01-11 15:10:12 -08:00
Rick Winfrey
f2eacd915c Build Structs (and also allow for empty structs) 2017-01-11 15:09:58 -08:00
Rick Winfrey
99e4e8da28 Add type and field declarations to Go category list 2017-01-11 15:09:19 -08:00
Rick Winfrey
7dcab8f987 Formatting 2017-01-11 15:06:28 -08:00
Rick Winfrey
9d9e3e295f Add FieldDecl Syntax 2017-01-11 15:06:06 -08:00
Rick Winfrey
ce8de2b833 Add FieldDecl category 2017-01-11 15:05:51 -08:00
joshvera
ccdaf8f663 Add PointerTy category 2017-01-11 17:45:31 -05:00
joshvera
5b2f6ed3d5 Make TypeDecl Identifiable 2017-01-11 16:32:01 -05:00
Rick Winfrey
2ac9497559 Add Default and TypeDecl arbitrary categories 2017-01-10 15:40:10 -08:00
Rick Winfrey
6e488a4d6f Add TypeDecl to Renderer.Split 2017-01-10 15:39:50 -08:00
joshvera
d1ed9fd7ba totality our old friend 2017-01-10 18:17:48 -05:00
joshvera
5d1e105dc3 Parse type declarations 2017-01-10 18:04:34 -05:00
joshvera
8fc30bea71 never mind don't make case statements identifiable 2017-01-10 16:51:50 -05:00
joshvera
0d13819f30 Make a switch statements clause a Maybe 2017-01-10 16:41:55 -05:00
Rob Rix
01347e4af9 Go back to QuickCheck’s RNG for RWS.
Changing the RNG changes the vectors which changes the similarities which changes the results which breaks the integration tests. See also #778.
2017-01-10 16:29:07 -05:00
joshvera
fdea1399f0 Make case statements identifiable 2017-01-10 16:21:29 -05:00
joshvera
6d42df94ec Add missing Default cases 2017-01-10 16:19:15 -05:00
Rob Rix
34d6c36b0c 📝 Data.Functor.Listable. 2017-01-10 16:10:07 -05:00
joshvera
d42962590b Consider expression_case to be a Case statement 2017-01-10 16:06:48 -05:00
joshvera
b6c22b8477 Don't consider expression_case_clause a Case statement 2017-01-10 16:06:26 -05:00
joshvera
83eb1539e9 Unpack expression_case_clause 2017-01-10 16:06:12 -05:00
joshvera
cbd132c8dc Add a Default Syntax for default cases 2017-01-10 16:05:55 -05:00
joshvera
3d95799fc7 Handle parameter declarations 2017-01-10 15:09:09 -05:00
joshvera
8de5504f97 Add a top level node in case comments come before a module 2017-01-10 13:48:23 -05:00
joshvera
531524f29c Revert "Don't wrap a VarAssignment in a VarDecl"
This reverts commit 2b39a7cc0576675f0104f67a00df799b6f9ef970.
2017-01-09 18:07:23 -05:00
joshvera
cbb31dd42a Fix up categories for var decls 2017-01-09 17:54:27 -05:00
joshvera
3fbc488c39 Don't wrap a VarAssignment in a VarDecl 2017-01-09 17:21:48 -05:00
joshvera
0f7e190c7f Map function literals to var assignment summaries 2017-01-09 16:42:39 -05:00
joshvera
98c5c41cfa Allow dictionaries to be identifiable 2017-01-09 15:20:36 -05:00
Rob Rix
b4cd153a43 Generate random walks with mkStdGen. 2017-01-09 15:16:06 -05:00
joshvera
57137db0cf bump tests 2017-01-09 15:13:55 -05:00
joshvera
760d99cc53 Allow arrays with types to be identifiable 2017-01-09 15:10:20 -05:00
Rob Rix
1ee9a60039 🔥 Arbitrary instances. 2017-01-09 14:59:04 -05:00
Rob Rix
21f0b8b152 🔥 {Term,Diff}.Arbitrary. 2017-01-09 14:46:47 -05:00
Rob Rix
c326fd447c Move the Listable instance for Patch into its module. 2017-01-09 14:45:09 -05:00
Rob Rix
57a4ecd6e3 Convert leaf values to Text using StringConv. 2017-01-09 14:29:24 -05:00
Rob Rix
233113913a 🔥 a redundant import of Test.LeanCheck. 2017-01-09 11:46:04 -05:00
Rob Rix
75d4488bf8 Export a Tier type synonym. 2017-01-07 23:37:20 -05:00
Rob Rix
489631ee50 Allow Term to be partially applied. 2017-01-07 09:34:49 -05:00
Rob Rix
ddaa2d2d18 Define a Listable newtype wrapper for Listable1 type applications. 2017-01-07 09:13:40 -05:00
Rob Rix
a9ba058cf9 Define a Listable1 instance over (Listable1 f, Listable a) => CofreeF f a. 2017-01-07 09:07:48 -05:00
Rob Rix
8a06e024f5 Define a Listable1 instance over (Listable1 f, Listable a) => FreeF f a. 2017-01-07 09:03:38 -05:00
joshvera
ae40908cd2 Update go tests 2017-01-05 17:08:28 -05:00
Rob Rix
ecd78d57fa Define a Listable1 instance over Listable1 f => Free f. 2017-01-05 15:48:08 -05:00
Rob Rix
b63dab4641 Define a Listable2 instance over Listable1 f => FreeF f. 2017-01-05 15:47:18 -05:00
Rob Rix
378acc4fc9 Define a Listable1 instance over Listable1 f => Cofree f. 2017-01-05 15:46:29 -05:00
Rob Rix
1cd0a540d4 Define a Listable2 instance over Listable1 f => CofreeF f. 2017-01-05 15:45:37 -05:00
Rob Rix
9a61258d3d Define a Listable instance over Listable a => DiffSummary a. 2017-01-05 15:41:30 -05:00
Rob Rix
78d1ec4da1 Define a Listable1 instance over DiffSummary. 2017-01-05 15:40:59 -05:00
Rob Rix
8d517541a0 Replace Category’s definition of ListableText. 2017-01-05 15:37:35 -05:00
Rob Rix
92e1fdf766 Define a Listable instance over ListableText.
This is fairly naïve, and should probably do something more like the Arbitrary instance in quickcheck-text:

http://hackage.haskell.org/package/quickcheck-text-0.1.2.1/docs/src/Test-QuickCheck-Utf8.html
2017-01-05 15:36:52 -05:00
Rob Rix
038b3605f1 Define a ListableText newtype. 2017-01-05 15:36:16 -05:00
Rob Rix
c8da9c5f31 Define a module for a Listable instance over Text. 2017-01-05 15:35:01 -05:00
Rob Rix
46c29feb45 Define a Listable2 instance over Either. 2017-01-05 15:33:51 -05:00
Rob Rix
66ed7316dd Define a Listable instance over Branch. 2017-01-05 15:30:21 -05:00
Rob Rix
33e6010e9c Define a Listable instance over Listable a => Gram a. 2017-01-05 15:28:15 -05:00
Rob Rix
a828467c58 Define a Listable1 instance over Gram. 2017-01-05 15:27:44 -05:00
Rob Rix
0331398deb Define a Listable2 instance over These. 2017-01-05 15:26:17 -05:00
Rob Rix
1dc26e985d Define a Listable1 instance over Joins of Listable2 bifunctors. 2017-01-05 15:24:56 -05:00
Rob Rix
c6b3025635 Define a Listable instance over Syntax leaf recur. 2017-01-05 15:22:56 -05:00
Rob Rix
7676e162cb Define a Listable1 instance over Listable leaf => Syntax leaf. 2017-01-05 15:22:49 -05:00
Rob Rix
15bc5d2cda Define a Listable2 instance over Syntax. 2017-01-05 15:22:29 -05:00
Rob Rix
6a1b6e7e76 Define a lifted cons over 4-ary constructors. 2017-01-05 15:22:11 -05:00
Rob Rix
b39a9c2d0e Define a Listable1 instance over []. 2017-01-05 15:11:05 -05:00
Rob Rix
d95077037e Define a Listable instance over Cost. 2017-01-05 15:04:42 -05:00
Rob Rix
d8058807f6 Define a Listable instance over non-empty Records. 2017-01-05 15:04:01 -05:00
Rob Rix
8949f8e7e0 Define a Listable instance over empty records. 2017-01-05 15:03:06 -05:00
Rob Rix
9b49fde245 Avoid exporting ListableText. 2017-01-05 15:01:34 -05:00
Rob Rix
5a6d8676cf Define a Listable instance over Category. 2017-01-05 14:59:55 -05:00
Rob Rix
c4c37914a0 Define a Listable newtype wrapping Text. 2017-01-05 14:59:39 -05:00
Rob Rix
d80ea55a59 Define a Listable instance over Patch. 2017-01-05 14:46:18 -05:00
Rob Rix
8c566860ee Define a Listable1 instance over Patch. 2017-01-05 14:45:56 -05:00
Rob Rix
9e486da785 Define a Listable instance over SourceSpan. 2017-01-05 14:44:22 -05:00
Rob Rix
3a7588ad1e Define a Listable instance over SourcePos. 2017-01-05 14:44:12 -05:00
Rob Rix
e1ee210468 Define a Listable instance over Range. 2017-01-05 14:42:57 -05:00
Rob Rix
6a2b1bf3a6 Define a Listable1 instance over Listable a => ((,) a). 2017-01-05 14:40:57 -05:00
Rob Rix
62eac61fe1 Define a Listable2 instance over (,). 2017-01-05 14:40:37 -05:00
Rob Rix
8d9562e94e Define a lifting of cons3. 2017-01-05 14:40:28 -05:00
Rob Rix
e5f4aed989 Define a lifting of cons2. 2017-01-05 14:40:16 -05:00
Rob Rix
fe6a0852c5 Lift Listable through Listable2. 2017-01-05 14:39:51 -05:00
Rob Rix
6db5cf152a Lift Listable over * -> * -> *. 2017-01-05 14:39:10 -05:00
Rob Rix
cae179abc2 Define a Listable1 instance over Maybe. 2017-01-05 14:38:45 -05:00
Rob Rix
1e57f7474b Define a lifting of cons1. 2017-01-05 14:38:31 -05:00
Rob Rix
f17fd281ab Lift Listable through Listable1. 2017-01-05 14:37:39 -05:00
Rob Rix
2d9f56f946 Lift Listable over * -> *. 2017-01-05 14:37:02 -05:00
Rob Rix
da422724b3 Re-export Listable & the tier operators. 2017-01-05 14:36:16 -05:00
Rob Rix
22248f26bf Stub in a Listable module. 2017-01-05 14:34:45 -05:00
Timothy Clem
efb505bc25 Only use qualified Data.Text 2016-12-13 08:14:18 -08:00
Timothy Clem
1a7e37408e Slightly nicer way to get vowels 2016-12-13 08:13:56 -08:00
Timothy Clem
489ed112a0 Match on Category instead of name and rework determiner logic 2016-12-12 17:40:28 -08:00
Timothy Clem
cd2fe4a681 Calculate determiner from following summary, not preceding patch 2016-12-12 15:27:09 -08:00
Timothy Clem
91721682a6 Give BEGIN/END their own Syntax 2016-12-12 15:26:26 -08:00
Timothy Clem
005a5f43d0 Parse BEGIN/END {} for Ruby 2016-12-12 13:41:55 -08:00
Timothy Clem
7fcc5ab88f Merge branch 'master' into ruby-parse-fixes 2016-12-12 09:15:01 -08:00
Timothy Clem
5b10012466 Parse Ruby scope operator 2016-12-12 08:30:43 -08:00
Timothy Clem
1741cef639 Parse Ruby range expressions 2016-12-11 08:36:26 -08:00
Timothy Clem
e9f8014e50 Add singleton_class category to Split 2016-12-09 16:15:49 -08:00
Timothy Clem
c9e1cfb9b2 Parse instance_variable as Identifier for now 2016-12-09 16:12:36 -08:00
Timothy Clem
526199c47d Parse pairs 2016-12-09 16:12:20 -08:00
Timothy Clem
7c9fc3e0c6 Parse singleton classes 2016-12-09 16:12:07 -08:00
Timothy Clem
616f7953a7 s/function call/method call 2016-12-09 16:10:56 -08:00
Timothy Clem
6dd7a994b6 Revert "Categorize ruby method calls as such"
This reverts commit b99a05f680abb19b819d55cb7d7c8a4da75f8cfd.
2016-12-09 15:51:08 -08:00
Timothy Clem
5db5376d93 Remove some unused imports 2016-12-09 14:52:36 -08:00
Timothy Clem
fcff364131 Remove old cata approach 2016-12-09 14:47:35 -08:00
Timothy Clem
d84537ec42 Add some style to these guards 2016-12-09 14:47:00 -08:00
Timothy Clem
df7e016c60 Collapse up parse to product json and sexp output 2016-12-09 14:32:22 -08:00
Timothy Clem
772265e0bb Rename s/test/sexpression 2016-12-09 11:42:32 -08:00
Timothy Clem
2ef173b934 Sexpr diffs show source spans and pad/indent properly 2016-12-09 11:30:41 -08:00
Timothy Clem
21aba52c7e Categorize ruby method calls as such 2016-12-09 11:29:39 -08:00
Timothy Clem
b16b8ecb87 Rework as top down recursion to print diff trees 2016-12-09 09:47:51 -08:00
Timothy Clem
bab1f677ff Hard wrap FDoc comments for readability 2016-12-09 08:33:34 -08:00
Timothy Clem
686b0dffff Add new sexp style test output for diffs 2016-12-09 08:31:13 -08:00
Timothy Clem
3b676d9f31 Play with a different parse output 2016-12-08 08:11:49 -08:00
joshvera
81e93c178c Update struct, dictionary, and array type mappings 2016-12-07 15:47:47 -05:00
joshvera
6eec2689e5 Map keyed_element to Pair 2016-12-07 15:38:05 -05:00
joshvera
b555baead6 Map const specs to var assignments 2016-12-07 15:37:51 -05:00
joshvera
19141c2610 Extract the termName from the type, otherwise from the term 2016-12-07 15:36:47 -05:00
joshvera
381453e3a7 Consider structs identifiable 2016-12-07 15:36:33 -05:00
Timothy Clem
aa26c5472e Properly parse classes (with new tree-sitter trees) 2016-12-07 10:45:55 -08:00
joshvera
076afb77ec update tests 2016-12-07 13:26:31 -05:00
joshvera
563652355d Add ArrayTy, DictionaryTy, StructTy, Struct 2016-12-06 16:09:04 -05:00
Timothy Clem
3e3ea818eb Move to where ConditionalOperator was 2016-12-06 12:47:16 -08:00
Timothy Clem
6e42369ffe Collapse up math assignment into operator assignment syntax 2016-12-06 12:36:56 -08:00
Timothy Clem
ec4db8d2da Fix duplicate import 2016-12-06 12:00:33 -08:00
Timothy Clem
85367c9312 Allow proper diffing of relational, bitwise and other operators in JavaScript
Fixes #771, a long standing issue in JavaScript diffing
2016-12-06 11:59:14 -08:00
Timothy Clem
3b3c6739f8 Accept all shapes of ruby operators 2016-12-06 11:56:42 -08:00
Timothy Clem
048ac119ed Remove need for Binary and Unary - just use operator instead. 2016-12-06 11:43:20 -08:00
Timothy Clem
97c17a1b5c Just moving operator_assignment around 2016-12-06 11:42:41 -08:00
Timothy Clem
907d9d6cff Update termConstruction for ruby with new unary and binary 2016-12-06 11:23:10 -08:00
Timothy Clem
5c0ee56565 Bring in new tree-sitter API to query all child nodes 2016-12-06 11:21:31 -08:00
Timothy Clem
bb17a32539 New rescue productions 2016-12-06 08:51:34 -08:00
Timothy Clem
b13262771a Fix up method calls and member_access (call) 2016-12-06 08:34:15 -08:00
Timothy Clem
73514388b6 self,nil,true,false all have productions now 2016-12-06 08:30:08 -08:00
Timothy Clem
bcfac758b6 Update lambda statements to single production 2016-12-06 08:20:27 -08:00
Timothy Clem
d7317e7360 Fix up Ruby case/when parsing 2016-12-06 08:14:23 -08:00
Rick Winfrey
171544de29 Merge branch 'master' into javascript-improvements 2016-12-05 18:07:51 -06:00
Timothy Clem
cbb9664d32 Rename a bunch of Ruby productions 2016-12-05 15:58:11 -08:00
Timothy Clem
2ee93b4525 New shape for yield statements 2016-12-05 15:56:18 -08:00
Timothy Clem
47402c7c8a New shape for return statements 2016-12-05 15:54:59 -08:00
joshvera
24b69f0dbd Expand call expressions to take more than one argument 2016-12-01 16:06:56 -05:00
joshvera
9cd616f7b3 Remove last from Prologue 2016-12-01 16:03:45 -05:00
joshvera
e9489780d6 Add support for float literals and var assignments 2016-12-01 15:33:37 -05:00
Rick Winfrey
a0fb4e75a7 Add Yield term constructor support for JavaScript 2016-11-30 15:56:57 -06:00