1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
Commit Graph

10641 Commits

Author SHA1 Message Date
Rick Winfrey
a25fa79627 Refactor channelType assignment 2017-11-27 17:25:03 -08:00
Rick Winfrey
829ad6772f Refactor identifier assignment 2017-11-27 17:24:49 -08:00
Timothy Clem
dc1b7ae388 Implement assignment evaluation 2017-11-27 14:44:03 -08:00
Timothy Clem
2e5a4c2a9b Linter doesn't like this 2017-11-27 14:43:45 -08:00
Timothy Clem
c3f10a1144 No need for MonoLocalBinds 2017-11-27 14:43:37 -08:00
Timothy Clem
32be8f48fd Better Eval instances for [] 2017-11-27 14:43:25 -08:00
Timothy Clem
66027a688e No need for MonoLocalBinds here 2017-11-27 14:43:03 -08:00
Timothy Clem
7afe9660f4 FreeVariables1 instances 2017-11-27 14:42:51 -08:00
Timothy Clem
8ce14ba44d Eval program accumulates, returns last value 2017-11-27 14:42:08 -08:00
Timothy Clem
11ca296fc0 Add FreeVariables1 instance for [] 2017-11-27 14:41:13 -08:00
Timothy Clem
73990f6c0b Fix up FreeVariables1 instances 2017-11-27 14:40:59 -08:00
Timothy Clem
15c90008c5 Eval instance for Ints 2017-11-27 12:48:49 -08:00
Timothy Clem
ca2a9511db Comment eval instances 2017-11-27 12:48:06 -08:00
Rob Rix
296569da6a Clean up the LANGUAGE pragma for Analysis.Decorator. 2017-11-27 14:54:01 -05:00
Rob Rix
8454467b61 Move the cyclomatic complexity analysis into its own module. 2017-11-27 14:52:27 -05:00
Rob Rix
ae985ef4e5 Factor ConstructorName into its own module. 2017-11-27 14:45:13 -05:00
Rob Rix
a844fec2bd Move the algebras into their own module. 2017-11-27 14:36:20 -05:00
Rob Rix
2102ab41cf Rename Decorating to Analysis. 2017-11-27 14:32:13 -05:00
Rob Rix
87d533cc2b Rename Language to Data.Language. 2017-11-27 14:17:48 -05:00
Rob Rix
46970445ff 🔥 some unused machinery in the Language module. 2017-11-27 14:10:33 -05:00
Rob Rix
3ebb972bd8 Move the Node datatype & AST synonym into Data.AST. 2017-11-27 13:45:37 -05:00
Rob Rix
fd31babd62 Rename Decorator to Decorating.Decorator. 2017-11-27 13:36:00 -05:00
Rob Rix
3a3ed72f96 Rename Renderer to Rendering.Renderer. 2017-11-27 13:30:38 -05:00
Rob Rix
dbb1a33fca Rename Parser to Parsing.Parser. 2017-11-27 13:24:45 -05:00
Rob Rix
9bfd64905d Rename Data.Syntax.Assignment to Assigning.Assignment. 2017-11-27 13:19:20 -05:00
Rob Rix
062d9cbfa9 Rename Files to Semantic.IO. 2017-11-27 13:09:03 -05:00
Rob Rix
1e95b0270e Rename SemanticCmdLine to Semantic.CLI. 2017-11-27 11:57:27 -05:00
Rob Rix
bb21a24a93 Rename RWS to Diffing.Algorithm.RWS. 2017-11-27 11:51:39 -05:00
Rob Rix
dad5abb189 Rename SES to Diffing.Algorithm.SES. 2017-11-27 11:48:39 -05:00
Rob Rix
cdefcdb33d Rename Interpreter to Diffing.Interpreter. 2017-11-27 11:45:08 -05:00
Rob Rix
cfd27ec20c Rename Algorithm -> Diffing.Algorithm. 2017-11-27 11:42:57 -05:00
Rob Rix
088c58f405 🔥 identifierAlgebra. 2017-11-24 14:06:46 -05:00
Rob Rix
4a7e5f6055 Align the argument docs. 2017-11-24 14:02:25 -05:00
Rob Rix
b9bca6f567 Rename the f type parameter to syntax. 2017-11-24 14:02:06 -05:00
Rob Rix
610a420023 Define some promotions of algebras to OpenRAlgebra. 2017-11-24 14:01:12 -05:00
Rob Rix
6d5f4a83f9 Links in the docs for fToR. 2017-11-24 13:59:54 -05:00
Rob Rix
58dc2d7b75 Define synonyms for open-recursive F- and R-algebras. 2017-11-24 13:58:46 -05:00
Rob Rix
b70e5ead7e Correct the docs for FAlgebra & RAlgebra. 2017-11-24 13:16:02 -05:00
Rob Rix
85c3754934 🔥 the Comonad & ComonadCofree instances for Term. 2017-11-23 13:27:21 -05:00
Rob Rix
35da07249e termAnnotation & termOut act on Term, not TermF. 2017-11-23 13:21:37 -05:00
Rob Rix
89338a8570 Define eliminators for TermF. 2017-11-23 13:14:46 -05:00
Rick Winfrey
b4247c41ca 🔥 choice and rename for clarity 2017-11-22 16:59:41 -08:00
Rick Winfrey
5a818411e5 Refactor forStatement 2017-11-22 16:50:25 -08:00
Rick Winfrey
90de7fafc0 Merge branch 'go-assignment' of github.com:github/semantic-diff into go-assignment 2017-11-22 15:38:04 -08:00
Rick Winfrey
48ff89e4fb Refactor variadicParameterDeclaration 2017-11-22 15:28:25 -08:00
Rick Winfrey
53a86743dd Reformating 2017-11-22 15:16:44 -08:00
Rick Winfrey
180b8c5959 Constructing term here is unnecessary 2017-11-22 15:15:18 -08:00
Rick Winfrey
fe6fc064cb Eliminate alternative 2017-11-22 15:15:07 -08:00
Rob Rix
d17b6399f2 Specialize RAlgebra to use Base. 2017-11-22 17:36:35 -05:00
Rob Rix
10a17b139e 🔥 irregular uses of RAlgebra. 2017-11-22 17:35:40 -05:00
Rob Rix
e12c3577de Parameterize FAlgebra by the type family. 2017-11-22 17:33:38 -05:00
Rob Rix
72c804dc48 Rename Language.Markdown to Parser.CMark. 2017-11-22 17:26:14 -05:00
Rob Rix
1c0101a269 Rename TreeSitter to Parser.TreeSitter. 2017-11-22 17:24:10 -05:00
Rob Rix
3a06686361 Rename Data.Syntax.Algebra to Decorator. 2017-11-22 17:21:22 -05:00
Rob Rix
2e7da5e2c1 🔥 withParser. 2017-11-22 17:05:26 -05:00
Rob Rix
f970aeddc7 Label the empty list like before. 2017-11-22 16:58:47 -05:00
Rob Rix
5a49d44516 Specialize for [] with a CustomConstructorName instance. 2017-11-22 16:55:33 -05:00
Rob Rix
e5726442ab 📝 ConstructorName. 2017-11-22 16:53:36 -05:00
Timothy Clem
66746b886d Find a better spot for these Eval instances 2017-11-22 13:50:44 -08:00
Timothy Clem
82e45bdb35 Collapse up collecting interpreter functions into one file 2017-11-22 13:50:22 -08:00
Rob Rix
10ba1e46b7 Refactor qualify to use guard. 2017-11-22 16:50:12 -05:00
Rob Rix
5dc52688df Refactor diffBlobPair to abstract over the syntax type only once. 2017-11-22 16:42:32 -05:00
Rick Winfrey
e1d308cb3f Rename BiDirectional -> Bidirectional 2017-11-22 13:40:48 -08:00
Rick Winfrey
d0be8cb3c3 Refactor type declarations 2017-11-22 13:37:48 -08:00
Rick Winfrey
09f2268433 Update Declaration.TypeAlias, introduce Declaration.Type 2017-11-22 13:37:32 -08:00
Rick Winfrey
e3d909dacc 🔥 Type.Alias (already exists in Declaration) 2017-11-22 13:36:50 -08:00
Rick Winfrey
959172f569 🔥 single fields 2017-11-22 13:32:19 -08:00
Timothy Clem
fb01619f7e One interpreter remains...
... and it's the caching evalutator.
2017-11-22 13:30:26 -08:00
Rob Rix
c83427c4cf Merge branch 'master' into existential-syntax-without-the-fire 2017-11-22 16:25:31 -05:00
Rob Rix
75bfb1903d Refactor parseBlob to abstract over syntax only once. 2017-11-22 16:10:39 -05:00
Rob Rix
8c2bf9fe59 Sort Data.Bifoldable up. 2017-11-22 16:09:09 -05:00
Rob Rix
8268101695 Define an eliminator for SomeParser. 2017-11-22 15:32:32 -05:00
Rob Rix
e1ee3264a1 Generalize SomeParser over the annotation type. 2017-11-22 15:31:51 -05:00
Rick Winfrey
4543337ced 🔥 comment 2017-11-22 11:11:37 -08:00
Timothy Clem
9d4a1f21b5 Evalute to Types 2017-11-22 10:48:12 -08:00
Timothy Clem
79cc2cae5a s/NoOp/Unit 2017-11-22 10:47:38 -08:00
Timothy Clem
cc41cec227 Shorten type application on example 2017-11-22 10:46:58 -08:00
Timothy Clem
08318707d9 EvalCollect instances 2017-11-22 10:19:22 -08:00
Timothy Clem
ce1581553b Rename eval <=> evaluate 2017-11-22 10:18:07 -08:00
Timothy Clem
0ffb83d22b Need this for some reason 2017-11-22 10:17:17 -08:00
Timothy Clem
87145308cd Bring in some of the other interpreters 2017-11-22 08:04:13 -08:00
Timothy Clem
c41bf38de6 Todo eval implementations and NoOp value and type 2017-11-22 08:03:51 -08:00
Rob Rix
5850c57282 Merge branch 'master' into go-assignment 2017-11-22 09:23:04 -05:00
Rob Rix
384178ec56 Merge branch 'master' into 🔥-patch-output 2017-11-21 17:13:51 -05:00
Rob Rix
aa8f6883e8 🔥 Alignment. 2017-11-21 17:12:00 -05:00
Rob Rix
94ce3fe8f6 🔥 Renderer.Patch. 2017-11-21 17:11:54 -05:00
Rob Rix
0ebcf1c7dc 🔥 PatchDiffRenderer. 2017-11-21 17:11:43 -05:00
Rob Rix
f714521f31 🔥 the --patch flag. 2017-11-21 17:11:16 -05:00
Rob Rix
2fbea81d9c Merge branch 'master' into fix-markdown-timeouts 2017-11-21 17:05:14 -05:00
Rick Winfrey
596c4535ab 📝 channel types in Go 2017-11-21 13:32:33 -08:00
Rick Winfrey
845f1c966e Alphabetize 2017-11-21 13:02:05 -08:00
Rick Winfrey
75b7ee3f76 🔥 unused constructors 2017-11-21 13:01:50 -08:00
Rick Winfrey
39fb78a697 Ordering 2017-11-21 12:54:08 -08:00
Rick Winfrey
2752d33ed8 Alignment 2017-11-21 12:53:08 -08:00
Rick Winfrey
9b170b39bb Specify Go specific type constructors 2017-11-21 12:49:01 -08:00
Rick Winfrey
0eb06a3741 🔥 Channel literal 2017-11-21 12:44:05 -08:00
Rick Winfrey
769548b4b3 Move Composite constructor to Go.Syntax 2017-11-21 12:43:56 -08:00
Rick Winfrey
2927f38bf9 Use old toc diff renderer for Go 2017-11-21 12:37:45 -08:00
Rick Winfrey
758d067d85 Add comments for Syntax 2017-11-21 12:26:46 -08:00
Rick Winfrey
7bf9c6de9c Rearranging 2017-11-21 12:15:48 -08:00
Rick Winfrey
51862aa8a2 Formatting 2017-11-21 11:57:25 -08:00
Rick Winfrey
f788ab0806 Detect and extract receiver type for Go method declarations in ToC Summary 2017-11-21 11:35:08 -08:00
Rick Winfrey
d3211a5dd2 Merge branch 'master' into go-assignment 2017-11-21 10:42:15 -08:00
Rick Winfrey
8dee0368ad Assign empty labeled statements 2017-11-21 10:29:06 -08:00
Rob Rix
6c5cb81b36 Export ApplyAll. 2017-11-21 12:19:06 -05:00
Rob Rix
5ff0f21583 🔥 unSomeParser. 2017-11-21 12:19:00 -05:00
Rob Rix
004a0390a7 Generalize someParser over the syntax types. 2017-11-21 11:47:49 -05:00
Rob Rix
6108aa1b64 Define ConstructorName using advanced overlap. 2017-11-21 11:46:48 -05:00
Rick Winfrey
0ab50d4a92 Update labelStatement -> labeledStatement 2017-11-20 20:22:56 -08:00
Rick Winfrey
fc7140e26f Rename typeSwitchSubject helper function 2017-11-20 19:55:06 -08:00
Rick Winfrey
b750b8f423 Allow empty blocks for type switch statements 2017-11-20 19:08:26 -08:00
Rick Winfrey
0b098b6b00 Replace many with manyTerm 2017-11-20 18:45:25 -08:00
Rick Winfrey
77aedf0d1d Update typeDeclaration to use manyTerm 2017-11-20 17:08:15 -08:00
Rick Winfrey
f44d0dc3fc Add back manyTerm combinator as an alias for many term 2017-11-20 17:08:03 -08:00
Rick Winfrey
f48a8dcf46 Remove extra term layer for parameters 2017-11-20 16:40:20 -08:00
Rick Winfrey
7b335fb2f1 Remove term 2017-11-20 16:40:07 -08:00
Rick Winfrey
a971450c57 Replace manyTerm with many 2017-11-20 16:36:17 -08:00
Rick Winfrey
b761e8cb48 Term and handle error for top level expression 2017-11-20 16:33:30 -08:00
Rick Winfrey
b559e33b7e Use program assign rule 2017-11-20 16:33:18 -08:00
Rick Winfrey
cb584daff0 Only contextualize terms 2017-11-20 16:32:55 -08:00
Rick Winfrey
dcce44efab Don't need manyTerm now 2017-11-20 16:32:37 -08:00
Rick Winfrey
45253041ac Don't need postContextualize now 2017-11-20 16:32:28 -08:00
Rick Winfrey
03509ca544 Don't duplicate type related assignments in expressions choices 2017-11-20 16:32:11 -08:00
Rick Winfrey
81422a603d Add program assignment 2017-11-20 16:31:16 -08:00
Timothy Clem
a4d11b6e63 Merge branch 'master' into fix-markdown-sourceLineRangesByLineNumber 2017-11-20 15:23:33 -08:00
Timothy Clem
16ef56d742 Merge remote-tracking branch 'origin/master' into fix-markdown-timeouts 2017-11-20 15:22:58 -08:00
Timothy Clem
94690bebaf Extract function instead of lambda 2017-11-20 15:09:13 -08:00
Timothy Clem
9df8c2f8a5 Add .tsx extension 2017-11-20 14:21:49 -08:00
Timothy Clem
4aedbf9647 Track contents as children of the heading 2017-11-20 14:20:23 -08:00
Timothy Clem
631594e01e Don't nest markdown sections/headings
There's a major performance problem with the `while` approach to detecting hierarchy in markdown headings/sections. This works around by just having headings stay flat (like they are returned from the cmark parser).
2017-11-20 13:47:46 -08:00
Timothy Clem
fcf455f9b1 Use choice for markdown assignment 2017-11-20 13:45:52 -08:00
Rick Winfrey
2b73b4361f Term if initializer and else clause statements 2017-11-20 11:30:17 -08:00
Rick Winfrey
31f07845d5 Contextualize rather than term rhs of binary expression 2017-11-20 10:42:24 -08:00
Rick Winfrey
4d92c9ce4e 🔥 top level term 2017-11-20 10:41:56 -08:00
Rick Winfrey
1d6f06e2bc We don't need to term expressions 2017-11-20 10:14:22 -08:00
Timothy Clem
ec6adbadf9 Clarify output formatting options a bit 2017-11-17 10:14:45 -08:00
Timothy Clem
f24625b547 Merge branch 'master' into fix-markdown-sourceLineRangesByLineNumber 2017-11-17 08:31:28 -08:00
Timothy Clem
a227562cc6 Finally able to write a test for this
This fails with the old implmentation and captures what we are seeing in some markdown files.
2017-11-17 08:30:57 -08:00
Timothy Clem
ddb8c4f3b1 Rewrite with elemIndex
Should be a bit faster b/c elemIndex uses memchr(3) under the covers.
2017-11-17 08:02:14 -08:00
Timothy Clem
0c64dbbf5e Keep recursing for term table of contents 2017-11-16 14:59:21 -08:00
Timothy Clem
9652926841 Merge remote-tracking branch 'origin/master' into generate-tags-with-context 2017-11-16 14:35:20 -08:00
Timothy Clem
fead2e2bb5 Example for how to eval 2017-11-16 14:26:50 -08:00
Rick Winfrey
e439ea941d Don't include comment in expression choices 2017-11-15 16:30:56 -08:00
Rick Winfrey
2cd1bc4f59 Use term to contextualize / post contextualize comments 2017-11-15 15:37:12 -08:00
Timothy Clem
d6d697c5a3 Fake evaluating of a program 2017-11-15 15:12:56 -08:00
Timothy Clem
e117286359 Some more Eval instances 2017-11-15 15:12:19 -08:00
Timothy Clem
68ca2166bf Default instances of Eval for the minimal Syntax 2017-11-15 15:11:02 -08:00
Timothy Clem
c0f74c3e02 Give evalute a default instance 2017-11-15 15:10:17 -08:00
Timothy Clem
7f42eb2b38 A pythonParser2 for convenience 2017-11-15 15:09:02 -08:00
Timothy Clem
480c8b1479 Small version of python syntax to work with 2017-11-15 15:08:35 -08:00
Josh Vera
633c981901 Merge branch 'master' into 🔥-monolithic-typescript-assignment 2017-11-15 16:43:56 -05:00
Timothy Clem
891a32f7d1 Merge branch 'master' into fix-markdown-sourceLineRangesByLineNumber 2017-11-15 13:43:49 -08:00
Timothy Clem
a1eca8f1dd Make string a type as well 2017-11-15 13:33:58 -08:00
Timothy Clem
83a1510c7b Merge remote-tracking branch 'origin/master' into integrate-abstract-interpretation 2017-11-15 13:25:35 -08:00
Rick Winfrey
017b511469 Merge branch 'master' into go-assignment 2017-11-15 11:22:25 -08:00
Rick Winfrey
29a0dcf6e9 Allow optional blocks for method declarations 2017-11-15 11:07:53 -08:00
Rick Winfrey
43cfb15bdb Assign multiple expressions before the first expression case clause in switch statements 2017-11-15 10:56:52 -08:00
Rick Winfrey
4da3e29501 Assign mutiple expressions in type case statements 2017-11-15 10:21:23 -08:00
Rick Winfrey
0d55fcb378 🔥 unnecessary emptyTerm 2017-11-15 10:10:01 -08:00
Rick Winfrey
ee26a95330 Assign multiple expressions wthin communication clauses 2017-11-15 10:06:59 -08:00
joshvera
c44af7ad8e no parens 2017-11-15 12:16:36 -05:00
joshvera
d06d81672e Enable JS and JSX in semantic-diff 2017-11-15 11:35:25 -05:00
Rob Rix
5ff724abfa Merge branch 'master' into integrate-abstract-interpretation 2017-11-15 11:33:48 -05:00
Rob Rix
4916ccde2f 🔥 monolithic TypeScript assignment. 2017-11-15 10:42:53 -05:00
Rob Rix
a53d9b5e46 Don’t specialize monolithic assignment for TypeScript. 2017-11-15 10:42:44 -05:00
Rick Winfrey
af63537d36 Enforce function literals requiring a block 2017-11-14 15:35:48 -08:00
Rick Winfrey
77bdbdbb77 Assign function declaration and function literals with optionals 2017-11-14 15:32:46 -08:00
Rick Winfrey
d7573fc6c4 Create a types group 2017-11-14 15:30:54 -08:00
Timothy Clem
f9fe282af1 Merge branch 'master' into better-json-decode-errors 2017-11-14 15:26:19 -08:00
Josh Vera
d900d3ba12 Merge branch 'master' into default-typescript-assignment 2017-11-14 18:17:44 -05:00
Timothy Clem
4ed36b699a Catch all forms of newlines in sourceLineRangesWithin 2017-11-14 14:49:46 -08:00
Rick Winfrey
e36799d4ef Assign function declarations with no body 2017-11-14 14:30:42 -08:00
Rick Winfrey
f8bca432a4 Assign unary complement expressions 2017-11-14 14:25:01 -08:00
Rick Winfrey
46cb13a4c1 Allow communication clauses to have empty bodies 2017-11-14 14:03:50 -08:00
Rick Winfrey
1564d7f029 Allow expressions within type switch guards 2017-11-14 13:49:29 -08:00
Rick Winfrey
105a6adace 🔥 parens 2017-11-14 13:49:15 -08:00
Timothy Clem
6b1ac4f0fa Use eitherDecode so we can include an error message 2017-11-14 11:52:49 -08:00
Rick Winfrey
b32a874f42 Merge branch 'master' into go-assignment 2017-11-14 11:02:17 -08:00
Josh Vera
b86431933d Merge branch 'master' into python-updates 2017-11-13 18:37:03 -05:00
Rick Winfrey
8b723fdaa8 Assign parameters and parameterDeclarations consistently 2017-11-09 16:58:03 -08:00
Rick Winfrey
eaa98db6fd Assign identifiers for the receiver of method declarations 2017-11-09 16:39:48 -08:00
Rick Winfrey
b4bdbc7cfb Allow single identifiers in method declaration parameter list 2017-11-09 15:58:30 -08:00
Rick Winfrey
ab2839d925 Assign for statements with a single expression condition 2017-11-09 15:00:33 -08:00
Rick Winfrey
8a78c17a40 Add arrayType assignment to top level expression choices 2017-11-09 14:26:47 -08:00
Rick Winfrey
69c85f1140 Formatting 2017-11-09 14:25:22 -08:00
Timothy Clem
8c727bd4f0 Extract out the Tag renderer into it's own module 2017-11-09 09:01:35 -08:00
Timothy Clem
9b7b22e0a5 Rework option handling for generating tags
Command is now `semantic parse --tags`
2017-11-08 15:30:34 -08:00
Timothy Clem
3fc53af5e0 classBody doesn't need to be a list 2017-11-08 14:00:08 -08:00
Timothy Clem
57dfc43035 Construct ClassDeclaration properly 2017-11-08 13:59:41 -08:00
Timothy Clem
772762ecef Merge remote-tracking branch 'origin/master' into generate-tags-with-context 2017-11-08 13:16:07 -08:00
Josh Vera
136ceb6ca1 Merge branch 'master' into json-updates 2017-11-08 15:22:48 -05:00
Rick Winfrey
4d0a7d5a62 Merge branch 'master' into go-assignment 2017-11-08 11:09:42 -08:00
joshvera
d1cc1ab0cf Parse the top-level value of json 2017-11-08 13:26:57 -05:00
joshvera
4e083945bd Pre and post contextualize last term in infixTerm 2017-11-08 12:53:56 -05:00
joshvera
6738df20f9 Add someTerm 2017-11-08 10:48:21 -05:00
Rick Winfrey
ea924e8801 🔥 handleError from channel type assignment 2017-11-07 16:55:28 -08:00
Rick Winfrey
12583b435e Assign recursive array type statements 2017-11-07 16:38:32 -08:00
Rick Winfrey
bf129739ec Make method declaration assignment more robust 2017-11-07 16:25:35 -08:00
Rick Winfrey
fce6296369 Assign type alias statements 2017-11-07 15:48:41 -08:00
Rick Winfrey
7bc345906f Add Type.Alias constructor 2017-11-07 15:48:26 -08:00