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

10476 Commits

Author SHA1 Message Date
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
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
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
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
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
Rick Winfrey
88edf93a78 Update parenthesizedType assignment 2017-11-07 13:31:29 -08:00
Rick Winfrey
410bb390fc Add ParenthesizedType constructor 2017-11-07 13:31:17 -08:00
Timothy Clem
4e2a23509f Merge branch 'master' into class-toc 2017-11-07 13:20:16 -08:00
joshvera
f876fbff20 Separate term and manyTerm logic in python 2017-11-07 15:55:23 -05:00
Rick Winfrey
7de725c9c8 Assign unary receive as a Recieve syntax 2017-11-07 11:18:43 -08:00
Rick Winfrey
c8c8b8ee20 Update comment 2017-11-07 10:27:57 -08:00
Rick Winfrey
0ea1643cb9 Assign empty statements 2017-11-07 10:01:23 -08:00
Rick Winfrey
4ad10b6bf7 Add newline 2017-11-06 17:00:42 -08:00
Rick Winfrey
1cdd847e16 Use Statement.Pattern in place of Go.Syntax.Communication 2017-11-06 17:00:04 -08:00
Rick Winfrey
2ca942a9e8 🔥 Communication constructor
- We can use Statement.Pattern, because the parent is a Go.Syntax.Select syntax. Because we have the parent context in the parse tree, adding a separate constructor for the case is unnecessary.
2017-11-06 16:59:42 -08:00
Rick Winfrey
bebfc6d761 Add TypeSwitch to Go Syntax Union 2017-11-06 16:58:15 -08:00
Rick Winfrey
3032bbef8e Add defaultCase to expressions choice 2017-11-06 16:57:46 -08:00
Rick Winfrey
f159e73b72 Assign type switch statements 2017-11-06 16:57:29 -08:00
Rick Winfrey
0330349c4c Assign type case clause statements 2017-11-06 16:57:18 -08:00
Rick Winfrey
b32add6c21 Assign type case statements 2017-11-06 16:57:08 -08:00
Rick Winfrey
74e9feddcd Assign type switch guard statements 2017-11-06 16:56:52 -08:00
Rick Winfrey
beb1789054 Add TypeSwitchGuard constructor 2017-11-06 16:56:25 -08:00
Rick Winfrey
9e6544a53a Add TypeSwitch constructor 2017-11-06 16:56:15 -08:00
Rick Winfrey
a7f461298b Separate default expression cases 2017-11-06 15:50:24 -08:00
joshvera
485669c6f8 qualify handleError 2017-11-06 16:04:54 -05:00
joshvera
bc10d0c696 qualify handleError 2017-11-06 16:01:06 -05:00
joshvera
0b6fa7bf93 handle assignment errors in markdown 2017-11-06 15:58:05 -05:00
joshvera
3fce07a948 handle assignment errors in json 2017-11-06 15:57:49 -05:00
joshvera
92769123c4 Catch exceptions in Ruby assignment back to assignment errors 2017-11-06 15:53:31 -05:00
joshvera
965d12dc98 Catch exceptions back to assignment errors 2017-11-06 15:53:05 -05:00
Josh Vera
e1dd46b419 Merge branch 'master' into default-typescript-assignment 2017-11-06 15:29:57 -05:00
joshvera
f74ba1a858 remove GHC.Stack 2017-11-06 13:52:25 -05:00
joshvera
59f137eccc s/data/newtype 2017-11-06 11:25:23 -05:00
joshvera
300d860ae5 Ruby/TypeScript 2017-11-06 11:24:58 -05:00
Rick Winfrey
d662655988 Unify default cases for various switch / select statements to one syntax 2017-11-03 17:11:38 -07:00
Rick Winfrey
cbd0b71ee3 🔥 DefaultCommunication constructor 2017-11-03 17:11:20 -07:00
Rick Winfrey
bbe0e0c3f4 Assign type alias declarations 2017-11-03 15:10:13 -07:00
Rick Winfrey
eba0d30983 Assign pointer literals 2017-11-03 15:01:23 -07:00
Rick Winfrey
39d0b31010 Move Pointer and Reference constructors from Statement.hs to Literal.hs 2017-11-03 15:00:46 -07:00
joshvera
59e928a07f 🔥 HasCallStack constraints in typescript 2017-11-03 15:30:27 -04:00
Josh Vera
8dd19297d4 Merge branch 'master' into typescript-fixes 2017-11-03 13:58:13 -04:00
joshvera
acbaf0cffc Add lookup type support 2017-11-03 10:36:43 -04:00
joshvera
8749edaf63 Contextualize/postContextualize classBodyStatements
We can't catch comments with emptyTerm because that'll add an emptyTerm node to every list of parameters/bodyStatements
2017-11-02 20:41:53 -04:00
joshvera
78e182578f Revert "Simplify formalParameters and classBodyStatements by parsing emptyTerm in case of comments in empty bodies"
This reverts commit b7c1f668ff14faf8493365ca2f217abf572284b3.
2017-11-02 20:37:09 -04:00
joshvera
6775483aa8 Simplify formalParameters and classBodyStatements by parsing emptyTerm in case of comments in empty bodies 2017-11-02 20:19:34 -04:00
Rick Winfrey
2c2925bedb Assign type conversion statements 2017-11-02 16:11:00 -07:00
Rick Winfrey
42cd73e67e Add TypeConversion constructor 2017-11-02 16:10:51 -07:00
joshvera
73369fc4bb Need term around second expression in binaryExpression 2017-11-02 17:51:03 -04:00
Rick Winfrey
11bd169080 Assign type assertion expressions 2017-11-02 13:02:25 -07:00
Rick Winfrey
e737f0ddb1 Add TypeAssertion constructor 2017-11-02 13:02:11 -07:00
Rick Winfrey
bb9403cea0 Improve assignment for field declarations 2017-11-02 11:55:03 -07:00
Rick Winfrey
a66fb94986 Add Field constructor for Constructors (Structs) 2017-11-02 11:54:34 -07:00
Rick Winfrey
4b7da9b75b Assign field declarations for multiple field identifiers 2017-11-02 11:24:09 -07:00
joshvera
a914e3732a Assign bit shift operators in semantic-diff 2017-11-02 13:12:52 -04:00
joshvera
7c3111f10c Assign comments in formal parameters 2017-11-02 12:26:42 -04:00