This repository has been archived by the owner on May 19, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 256
TypeScript parser #523
Merged
Merged
TypeScript parser #523
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
aa2566d
WIP: TypeScript parser
fc81c23
Use '.indexOf' instead of '.includes'
7e239a7
"access" -> "accessibility" (Fix tsep-babylon-test#14)
f5c6ba1
Merge branch 'master' into ts-wip
4a69f1f
Change TSIndexSignatureDeclaration to TSIndexSignature
6a35a87
Merge pull request #1 from andy-ms/ts-indexSignature
e67d239
Change TSModuleBlock `.statements` to `.body`
7f52f62
Merge pull request #2 from andy-ms/ts-namespace-body
cd1941e
Use TypeParameterDeclaration and TypeParameter nodes instead of a TsT…
2dc2d63
Merge pull request #3 from andy-ms/ts-TypeParameterDeclaration
ce3f89e
Use TypeAnnotation node for type annotations
225204a
Merge pull request #4 from andy-ms/ts-TypeAnnotation
e408668
Remove optional "name" on TSTypeElementBase, because some type elemen…
c0b32ce
Add TSInterfaceBody intermediate node
d596f55
Merge pull request #5 from andy-ms/ts-interface-body-body
65d9043
Change "name" fields to "id" or "key"
7643fa8
Merge pull request #6 from andy-ms/ts-name-id-key
a339739
Introduce TSDeclareFunction and TSDeclareMethod node types
00e680b
Merge pull request #7 from andy-ms/ts-declarefunction
ac4255c
Change TypeParameter name to a string to match flow
78df03f
Use TypeParameterInstantiation nodes
b26c1bc
Fix bug where TypeParameter.name was an Identifier instead of a string
a605559
Use TypeParameterInstantiation for call/new type arguments
25f8779
Fix bug: arrow function parameter should have TypeAnnotation node
30a9e47
Add TSParameterProperty
303a081
Merge pull request #8 from andy-ms/ts-ParameterProperty
d2619b9
Use options object for maybeParseFunctionBody
5569e15
Attach decorators to the TSParameterProperty, not to the Identifier
1c4f875
Merge pull request #9 from andy-ms/ts-parameter-property-decorator
c75745f
Make TSTypePredicate store a TypeAnnotation node instead of directly …
3537272
Merge pull request #10 from andy-ms/ts-TypePredicate-annotation
733943a
parseExprOp: Factor out typescript-specific code to overrideable methods
a06eb46
Merge branch 'master' into ts-wip
e6210f7
expression.js: Remove forward-declarations and use overrides instead
7834a35
Inline parseCallExpression
345930d
Remove `parsePropertyNameInfo`, no longer needed
c01500c
Remove TsTypeElementBase. Call/construct/index signatures are never o…
c20dfa7
Introduce BodilessFunctionOrMethodBase type
7ebe5dc
Don't expose tsParseEnumDeclaration; instead, override `parseStatemen…
5a88758
Prefer switch statements to long if...else-if chains
6a10fd4
Clean up some statement.js changes
fe13a1e
Implicit return -> explicit return
4a0c4a1
Merge branch 'master' into ts-wip
3e25e55
Merge branch 'master' into ts-wip
8524c48
Move handling of special imports/exports to typescript.js
42fb31e
No need to disable export checks
307de59
Always set VariableDeclaration.init
0424c79
Move TypeScript-specific code out of `parseClassMember`
b6b2eb6
Rename typeArguments to typeParameters
ab0dcc0
Merge pull request #11 from andy-ms/ts-typeParameters
a4cb112
Be more strict about when optional properties are allowed
dd115de
Don't check for duplicate exports
07cd896
Fix type of TSDeclareMethod
a127a06
Move checkReservedWord handling to override
bee125d
Use an override for parseExprOp
024f18e
Factor typescript-specific code out of parseSubscript
78e8061
Refactor maybeParseFunctionBody to avoid checking hasPlugin("typescri…
434ab3e
Remove useless hasPlugin("typescript") from within typescript plugin
53d3683
Remove doParseFunctionParams
d95aec6
Use atPossibleAsync in one more place
7fd24e6
Combine parseFunctionReturnTypeAndBodyAndFinish with parseFunctionBod…
8280b95
Handle false positive for `new` with type arguments
db0b2f5
Undo runFixtureTests change
7d393d1
Merge branch 'master' into ts-wip
f494cab
Move several changes out of lval.js and into overloads
5b56e59
Move parseBindingList changes out of lval.js and into an override
eb5e8dc
Make type annotation range start at the ':' or '=>'
6a4aefb
Merge pull request #12 from andy-ms/type-annotation-range
a500a47
Merge branch 'master' into ts-wip
f55e24f
Remove unused method
bb42b09
Add test fow optional binding element in flow
87564dc
Merge branch 'master' into ts-wip
102be0e
Factor out overridable parseNewArguments to replace parseNewTypeArgum…
e272c44
Fail on `new C<T>;` with no parentheses
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw
is not needed --#unexpected()
already throwsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flow will complain without the
throw
since it's not clear that control flow can't reach the end without assigningname
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I didn't think about that