Rob Rix
5b261b5ffd
Define a default TaggableBy instance.
2019-09-18 12:44:02 -04:00
Rob Rix
8756897833
Stub in a type family for selecting a Strategy.
2019-09-18 12:43:54 -04:00
Rob Rix
dc3774047d
Define an advanced-overlappable Taggable class.
2019-09-18 12:41:22 -04:00
Rob Rix
d3a462aaf7
Use the constraint synonym.
2019-09-18 12:39:49 -04:00
Rob Rix
d4773d2431
🔥 a redundant Traversable constraint.
2019-09-18 12:39:01 -04:00
Rob Rix
222aff395e
🔥 Show1 as a superclass of Taggable.
2019-09-18 12:37:46 -04:00
Rob Rix
eb2c17be38
🔥 Traversable as a superclass of Taggable.
2019-09-18 12:36:37 -04:00
Rob Rix
6ca0fd8e9d
🔥 redundant constraints.
2019-09-18 12:29:56 -04:00
Rob Rix
662a324061
🔥 redundant language extensions.
2019-09-18 12:28:00 -04:00
Rob Rix
9da576ecdc
Revert "Factor the Taggable instances for TSX/TypeScript into the syntax modules."
...
This reverts commit de9b171d55
.
2019-09-18 12:21:51 -04:00
Rob Rix
962f46db48
Revert "Move the Taggable instances for Data.Syntax out."
...
This reverts commit a30be6b59c
.
2019-09-18 12:21:46 -04:00
Rob Rix
f017e4ac7c
Revert "Move the Taggable instances for Data.Syntax.Type out."
...
This reverts commit d35321cb70
.
2019-09-18 12:21:43 -04:00
Rob Rix
efa83c3036
Revert "Move the Taggable instances for Data.Syntax.Comment out."
...
This reverts commit 211e2754d0
.
2019-09-18 12:21:39 -04:00
Rob Rix
9e20ab8fc4
Revert "Move the Taggable instances for Markdown out."
...
This reverts commit 08108c9a92
.
2019-09-18 12:21:36 -04:00
Rob Rix
399799bedd
Revert "Move the Taggable instances for PHP out."
...
This reverts commit f560f70403
.
2019-09-18 12:21:32 -04:00
Rob Rix
decc1baf6f
Revert "Move the Taggable instances for Java out."
...
This reverts commit 8a5a89d779
.
2019-09-18 12:21:22 -04:00
Rob Rix
eb79d45af1
Revert "Move the Taggable instances for Haskell out."
...
This reverts commit 1ba6f0acd8
.
2019-09-18 12:21:20 -04:00
Rob Rix
2542157dd5
Revert "Move the Taggable instances for Directive out."
...
This reverts commit 108c063cab
.
2019-09-18 12:21:17 -04:00
Rob Rix
e45a0ce803
Revert "Move the Taggable instances for Go out."
...
This reverts commit 5373d4c509
.
2019-09-18 12:21:15 -04:00
Rob Rix
7d61f208b2
Revert "Move the Taggable instances for Python out."
...
This reverts commit 6ce8f998db
.
2019-09-18 12:21:12 -04:00
Rob Rix
b43d32ee59
Revert "Move the Taggable instances for Statements out."
...
This reverts commit d62fa2381e
.
2019-09-18 12:21:09 -04:00
Rob Rix
d62fa2381e
Move the Taggable instances for Statements out.
2019-09-18 12:19:11 -04:00
Rob Rix
6ce8f998db
Move the Taggable instances for Python out.
2019-09-18 12:17:35 -04:00
Rob Rix
5373d4c509
Move the Taggable instances for Go out.
2019-09-18 12:15:21 -04:00
Rob Rix
108c063cab
Move the Taggable instances for Directive out.
2019-09-18 12:13:03 -04:00
Rob Rix
1ba6f0acd8
Move the Taggable instances for Haskell out.
2019-09-18 12:12:26 -04:00
Rob Rix
8a5a89d779
Move the Taggable instances for Java out.
2019-09-18 12:07:50 -04:00
Rob Rix
f560f70403
Move the Taggable instances for PHP out.
2019-09-18 12:05:05 -04:00
Rob Rix
08108c9a92
Move the Taggable instances for Markdown out.
2019-09-18 11:59:59 -04:00
Rob Rix
211e2754d0
Move the Taggable instances for Data.Syntax.Comment out.
2019-09-18 11:39:11 -04:00
Rob Rix
d35321cb70
Move the Taggable instances for Data.Syntax.Type out.
2019-09-18 11:38:28 -04:00
Rob Rix
a30be6b59c
Move the Taggable instances for Data.Syntax out.
2019-09-18 11:36:54 -04:00
Rob Rix
de9b171d55
Factor the Taggable instances for TSX/TypeScript into the syntax modules.
2019-09-18 11:32:44 -04:00
Rob Rix
d7cc25fcf5
Export subtractLocation.
2019-09-18 11:31:04 -04:00
Patrick Thomson
c237f26b58
Update src/Language/TypeScript/Assignment.hs
...
Co-Authored-By: Rob Rix <robrix@github.com>
2019-09-18 09:39:13 -04:00
Patrick Thomson
058462adf5
Merge remote-tracking branch 'origin/master' into bump-to-tree-sitter-0.2.1
2019-09-17 16:17:43 -04:00
Patrick Thomson
abaf6d9f43
Restore ThisType's presence in the list and spruce up TSX function detection
2019-09-17 15:44:46 -04:00
Patrick Thomson
11d9eccbd1
Revert "No more ThisType in Typescript grammar"
...
This reverts commit 05319f0b78
.
2019-09-17 15:35:32 -04:00
Patrick Thomson
6433f41991
match GeneratorFunctionDeclaration
2019-09-17 15:33:39 -04:00
Patrick Thomson
81348102a2
Fix bugs with spurious children calls in method/class definition
2019-09-17 15:27:03 -04:00
Patrick Thomson
41c88d4255
Remove buggy children
2019-09-17 15:00:10 -04:00
Patrick Thomson
6a7e72bcba
Remove debug printfs and silence a hedgehog error.
2019-09-17 14:49:16 -04:00
Patrick Thomson
2c3a78825e
Remove detritus from ifStatement
2019-09-17 14:42:56 -04:00
Patrick Thomson
8217bcc347
Fix communicationClause folderol
2019-09-17 14:36:03 -04:00
Patrick Thomson
b329d81e12
Children without a symbol rule is usually a bug.
2019-09-17 14:19:13 -04:00
Patrick Thomson
02f3f375c3
Don't serve Java over the API.
2019-09-17 12:30:40 -04:00
Patrick Thomson
f0a34778ad
Remove Java from AST parser plumbing
2019-09-17 12:29:00 -04:00
Patrick Thomson
d48816c74d
IfInitializer went away
2019-09-17 12:27:31 -04:00
Patrick Thomson
e3b0b65a87
TypeCaseClause seems (?) to have gone away
2019-09-17 12:26:55 -04:00
Patrick Thomson
3ea0361bb0
CommunicationClause went away
2019-09-17 12:23:38 -04:00
Patrick Thomson
044fbbbc20
ExpressionCaseClause went away
2019-09-17 12:22:35 -04:00
Patrick Thomson
50e3f684ef
Remove Go ElseClause
2019-09-17 12:20:34 -04:00
Patrick Thomson
c14354483b
Disable Java assignment for now.
2019-09-17 12:17:49 -04:00
Patrick Thomson
11fde99fe4
AbstractClass => AbstractClassDefinition
2019-09-17 12:13:05 -04:00
Patrick Thomson
7d94893bed
Don't match CallSignature (TSX).
2019-09-17 12:12:41 -04:00
Patrick Thomson
456cc138f1
Remove anonymousClass (TSX).
2019-09-17 12:11:54 -04:00
Patrick Thomson
022e8217a0
Remove for_of statements.
2019-09-17 12:11:26 -04:00
Patrick Thomson
8026e31c44
Ensure callSignature returns a Term.
2019-09-17 12:11:11 -04:00
Patrick Thomson
7004569d1e
CallSignature doesn't have its own symbol anymore.
2019-09-17 12:08:04 -04:00
Patrick Thomson
4e15f289ca
AbstractClass -> AbstractClassDeclaration
2019-09-17 12:04:57 -04:00
Patrick Thomson
d9f5c85066
AnonymousClass is now covered under standard class rule.
2019-09-17 12:03:45 -04:00
Patrick Thomson
9d22506544
No more TypeSwitchGuard.
2019-09-17 11:38:17 -04:00
Timothy Clem
05319f0b78
No more ThisType in Typescript grammar
2019-09-17 08:30:20 -07:00
Timothy Clem
fb885ccd1d
New flag to log paths
2019-09-16 14:20:05 -07:00
B1nj0y
caf879cf19
Fix a JavaScript import syntax error in comments
2019-09-17 00:49:19 +08:00
Patrick Thomson
6fc97fce21
Update src/Language/Java/Assignment.hs
...
Parens are not necessary here.
Co-Authored-By: Rob Rix <robrix@github.com>
2019-09-06 13:36:43 -04:00
Patrick Thomson
c623d2906b
Assignment error in Java try/catch blocks ( #235 )
...
As @tclem pointed out, the TryStatement token was being consumed too
early. We also ran into errors within the `catches` clause where we
required a block but were asking for an expression.
2019-09-06 12:23:55 -04:00
Patrick Thomson
0d78391678
Merge branch 'master' into lingo
2019-08-22 15:18:23 +02:00
Max Brunsfeld
07ccbb8966
Handle JSX elements with type arguments
...
Also, add a unit test for JSX in JavaScript.
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2019-08-21 10:31:32 -07:00
Timothy Clem
147604e59d
Streamline manually language parsing
2019-08-16 14:06:49 -07:00
Timothy Clem
0aab5ebd55
Replace supportedExts
2019-08-15 15:48:17 -07:00
Timothy Clem
2510df0e23
Switch over to using lingo
2019-08-14 16:01:55 -07:00
Max Brunsfeld
5d62300ba5
Add comment about why JS and JSX are handled with the TSX parser
2019-08-14 10:17:57 -07:00
Max Brunsfeld
233a51cf62
Use TSX parser instead of Typescript parser for JavaScript and JSX
2019-08-14 10:08:25 -07:00
Timothy Clem
77b6b85d49
Properly parse other objects and modes
2019-07-31 09:42:05 -07:00
Timothy Clem
3409779b23
s/OnlyPaths/IncludePaths
2019-07-31 07:37:23 -07:00
Timothy Clem
42028a818f
Allow ts-parse
command to also accept these
2019-07-30 17:36:25 -07:00
Timothy Clem
2b37bc9312
New options for readBlobsFromGitRepo
...
Allows specifying only the paths you want to parse in the repo
2019-07-30 17:34:35 -07:00
Rob Rix
b889e41b79
Merge branch 'master' into proto-fixes
2019-07-26 10:08:15 -05:00
Kitten King
2aa6b4a12d
Fix Typos
2019-07-26 03:25:50 +00:00
Timothy Clem
540f0eb76b
Revert manual oneof proto edits
2019-07-25 11:28:55 -07:00
Timothy Clem
d8ad7f2b25
Merge branch 'master' into proto-rework
2019-07-16 08:36:39 -07:00
Rob Rix
1dbb44170f
Fix some deprecations &c.
2019-07-15 16:50:06 -04:00
Rob Rix
c9aedbc707
Sort imports.
2019-07-15 15:23:34 -04:00
Rob Rix
b1fe3e6073
🔥 a bunch of redundant imports.
2019-07-15 15:23:29 -04:00
Rob Rix
0ac44393ff
Hide :+:.
2019-07-15 14:54:40 -04:00
Patrick Thomson
3cdfe55b80
Unnecessary use of &.
2019-07-06 13:32:00 -04:00
Patrick Thomson
eefb1d5d36
Stray whitespace change.
2019-07-06 13:28:20 -04:00
Patrick Thomson
5c033973ae
Kill unused import.
2019-07-06 13:26:01 -04:00
Patrick Thomson
0749aa1c91
Remove the unused 'analyze'.
2019-07-06 13:24:16 -04:00
Patrick Thomson
7221e71279
Fix Interpose
2019-07-06 12:43:52 -04:00
Patrick Thomson
3438e476ea
Fix effects in semantic-core.
2019-07-06 12:35:57 -04:00
Patrick Thomson
f3bc363cad
unsuccessful take on Analyze
2019-07-06 12:27:44 -04:00
Patrick Thomson
3af388b633
more monad massages
2019-07-06 12:01:57 -04:00
Patrick Thomson
d01ad24d83
Ditto, but for bitwise functions.
2019-07-06 11:42:53 -04:00
Patrick Thomson
0329984dfa
Handle needed changes associated with NumericFunction.
2019-07-06 11:35:19 -04:00
Patrick Thomson
94c8adba23
Fix most effects except Interpose
2019-07-06 11:27:12 -04:00
Patrick Thomson
f401f75303
WIP
2019-07-06 10:52:38 -04:00
Timothy Clem
a48aa65cfc
Bring back ping request/response
2019-07-05 15:34:35 -07:00
Timothy Clem
7b44a6a24e
Repeatable code gen from proto
2019-07-05 15:11:33 -07:00
Patrick Thomson
23733f9ac9
Merge branch 'master' into php-strict-equal-assignment
2019-07-03 12:07:55 -04:00
Patrick Thomson
cfcd27545d
Merge branch 'master' into php-concat
2019-07-03 11:06:42 -04:00
Patrick Thomson
daacddc5c4
Merge branch 'master' into php-strict-equal-assignment
2019-07-03 11:04:27 -04:00
Kevin Orr
5b5a9965dc
[ #186 ] Fix PHP string concatenation and augmented assignment
2019-07-03 09:54:13 -04:00
Kevin Orr
8a6737b079
[ #188 ] Fix PHP strict inequality assignment
2019-07-02 16:38:17 -04:00
Patrick Thomson
785ba4dcea
Include vertex IDs in JSON graph output and fix their format.
...
As reported in #189 , the `edges` field of JSON graph output refers to
information not reflected in the rest of the output, specifically the
vertex IDs. This patch adds that information to the `ToJSON` instance
for `ControlFlowVertex`. It also includes a `toEncoding` instance for
a free speed boost.
During this patch, I realized that, because `hash` tends to return a
large number (since `Int` is 64-bit), we may run into errors when
decoding JSON. One example hash is `3500157981503982114`; passing that
to a JS engine's `Number.isSafeInteger` function returns false. The
correct thing to do here is return ids as strings, which I have done.
This is backwards-incompatible, but since this information was never
properly exposed, the impact is negligable.
2019-07-02 11:24:52 -04:00
Josh Vera
3dea3d7e34
Merge branch 'master' into add-php
2019-06-25 15:11:19 -04:00
Patrick Thomson
90fabfe6f5
Fix DiffTreeVertexDiffTerm definition to be a valid protobuf object.
...
We define the DiffTreeVertex protobuf message like so:
```protobuf
message DiffTreeVertex {
int32 diff_vertex_id = 1;
oneof diff_term {
DeletedTerm deleted = 2;
InsertedTerm inserted = 3;
ReplacedTerm replaced = 4;
MergedTerm merged = 5;
}
}
```
This is turned into two Haskell types, a toplevel `DiffTreeVertex` type
and a `DiffTreeVertexDiffTerm` type that represents the anonymous
`oneof` type. Said types looked like so:
```haskell
data DiffTreeVertexDiffTerm
= Deleted (Maybe DeletedTerm)
| Inserted (Maybe InsertedTerm)
| Replaced (Maybe ReplacedTerm)
| Merged (Maybe MergedTerm)
deriving stock (Eq, Ord, Show, Generic)
deriving anyclass (Proto3.Message, Proto3.Named, NFData)
```
This is the wrong representation, as it neglects to account for the
fact that options could be added to the `diff_term` stanza. A sum type
does not provide enough constructors to handle the case of when none
of `deleted`, `inserted`, `replaced` etc. is `Just` anything. A more
correct definition follows:
```haskell
data DiffTreeVertexDiffTerm = DiffTreeVertexDiffTerm
{ deleted :: Maybe DeletedTerm
, inserted :: Maybe InsertedTerm
, replaced :: Maybe ReplacedTerm
, merged :: Maybe MergedTerm
}
```
This patch applies the above change, using `-XPatternSynonyms` to
provide backwards-compatible API shims. Though this changes JSON
output format (through the `ToJSON` instance), it should have no
bearing on backwards compatibility in protobuf objects, since there is
no way to consume diff trees as protobufs as of this writing.
Fixes #168 .
2019-06-25 13:31:36 -04:00
Josh Vera
3daee383dc
Merge branch 'master' into add-php
2019-06-25 12:28:25 -04:00
joshvera
6863168acb
Add phpt to extensionsForLanguage
2019-06-25 11:01:02 -04:00
joshvera
f911766986
Add phpASTParser
2019-06-25 10:35:56 -04:00
joshvera
cc4cc62411
Assign FormalParameters in parameters
2019-06-25 10:35:44 -04:00
joshvera
275de222de
Add php to code nav languages
2019-06-24 17:33:03 -04:00
Gus Caplan
c5dfb7f374
Add .mjs
as extension for JavaScript
2019-06-22 19:53:43 -05:00
Rob Rix
8cd44aa5fa
Merge branch 'master' into update-php-assignment
2019-06-21 09:59:15 -04:00
Rick Winfrey
4fdcef9822
Merge branch 'master' into update-php-assignment
2019-06-20 17:37:41 -07:00
Rick Winfrey
1d03fae11d
Add PHP to supportedExts and codeNavLanguages
2019-06-20 17:30:10 -07:00
Rick Winfrey
f793346895
Match FormalParameter
symbol
2019-06-20 11:42:37 -07:00
Patrick Thomson
dd8446c909
Drop the transformers dependency.
2019-06-20 14:13:54 -04:00
Patrick Thomson
b1a2b85d87
Merge remote-tracking branch 'origin/master' into machines-to-streaming
2019-06-20 14:09:39 -04:00
Patrick Thomson
9f20899d85
Can't eliminate MTL yet, but we can minimize it.
2019-06-20 14:02:12 -04:00
Patrick Thomson
0564b9d36c
Eliminate mtl dependency.
2019-06-20 13:50:50 -04:00
Patrick Thomson
2cefe29fbc
no partial type sigs necessary
2019-06-20 12:58:16 -04:00
Rob Rix
16d553167e
Revert "Add a little lambda calculus to toy with."
...
This reverts commit 50813fd5047ad648c9169d03f238687a56ffec3c.
2019-06-20 10:54:03 -04:00
Rob Rix
ccf8e1a7b9
Add a little lambda calculus to toy with.
2019-06-20 10:54:03 -04:00
Rob Rix
610acb7380
Indent/newline.
2019-06-20 10:54:03 -04:00
Rob Rix
1a1bfc3ca7
Generalize the Custom strategy over any Show-able type.
2019-06-20 10:54:03 -04:00
Rob Rix
bb54b3094d
Serialize field metadata.
2019-06-20 10:54:03 -04:00
Rob Rix
caeff71a33
Serialize fields.
2019-06-20 10:54:02 -04:00
Rob Rix
50b9298457
Serialize unit constructors.
2019-06-20 10:54:02 -04:00
Rob Rix
8e98f7eaed
Use advanced overlap to accommodate customizing for Text fields.
2019-06-20 10:54:02 -04:00
Rob Rix
b1d632fb2d
Serialize products.
2019-06-20 10:54:02 -04:00
Rob Rix
ca3101d432
Serialize sums.
2019-06-20 10:54:02 -04:00
Rob Rix
d15b031285
Prepend constructor names.
2019-06-20 10:54:01 -04:00
Rob Rix
4452c89a06
Serialize D1.
2019-06-20 10:54:01 -04:00
Rob Rix
0f54a5c506
Stub in a serialization class for generics over precise ASTs.
2019-06-20 10:54:01 -04:00
Rob Rix
a483615f21
Stub in a module for generic s-expression serialization of precise ASTs.
2019-06-20 10:53:48 -04:00
Patrick Thomson
40e5adfdb0
Further simplifications.
2019-06-20 10:37:02 -04:00
Patrick Thomson
17407c0c9d
Initial port from machines to streaming.
2019-06-20 09:41:27 -04:00
Patrick Thomson
6306f07cc1
Better story for handling JSON exceptions.
2019-06-19 17:14:52 -04:00
Patrick Thomson
8ae90e53c5
Quiet debug spew in specs.
...
This console barf makes reading though backscrolls unpleasant. Using
Shelly rather than an abomination of a `system` call and adding a
helper function to parse files quietly improved the situation greatly.
This also contains changes to Util that make the file significantly
easier to navigate, thanks to the power of `PartialTyepSignatures`.
Fixes #140 .
2019-06-19 12:09:37 -04:00
Jan Hrček
915937c4be
Fix some hlint warnings
2019-06-16 13:40:13 +02:00
Jan Hrček
8959d4d1d6
Fix -Wdodgy-imports warnings
2019-06-14 15:46:06 +02:00
Weerasak Chongnguluam
da56c8b8a5
Remove unused RankNTypes extension
2019-06-14 13:39:00 +07:00
Patrick Thomson
0c639db9c4
And these named fields.
2019-06-13 14:38:08 -04:00
Patrick Thomson
c368c43dce
🔥 Finite instance.
2019-06-13 14:21:27 -04:00
Patrick Thomson
838f09e31c
Remove HasDefault and Primitive instances for Language.
...
Those instances are handled by the bridged data types in `Semantic.Api`.
Keeping this around is both unnecessary and is making #139 go all
wobbly for reasons that are still unclear to me.
2019-06-13 14:14:57 -04:00
Patrick Thomson
aa02a62f76
Merge branch 'master' into gitparsing
2019-06-10 12:19:37 -04:00
lalaition
e4319224e3
Cleaned up parser
2019-06-09 14:11:58 -06:00
joshvera
bf75070b98
remove TSX.Resolution
2019-06-07 12:46:25 -04:00