Retsam
d2c75c2d38
fix: corrects handling of newline after async with paren-less arrow function ( #8830 )
...
If async is followed by a newline, then a paren-less arrow function should be parsed as two expressions
2018-10-09 23:25:31 +02:00
Retsam
08454ece46
Typescript - Tuples can include rest elements ( #8805 )
2018-10-08 11:32:31 -05:00
Bruno Macabeus
850bc1d3dd
class private methods and properties: should not allow spaces between # and identifier ( #8756 )
2018-10-02 19:31:06 -07:00
Brian Ng
2575312d1f
Fix parsing of slash after class expression ( #8804 )
2018-10-02 20:45:53 -05:00
Retsam
a5b5ed928d
Typescript - Tuple elements can be optional ( #8720 )
2018-10-02 11:29:51 -05:00
Nicolò Ribaudo
3c87401714
[decorators] [typescript] Parse type parameters ( #8767 )
...
* [decorators] [typescript] Parse type parameters
* Add test for invalid code
2018-10-01 22:04:19 +02:00
Matthew Robertson
07862e7272
Fix perf issue in typescript parser plugin ( #8792 )
2018-10-01 12:59:16 -05:00
Pig Fang
f38be13113
TypeScript: reserve unknown as TSUnknownKeyword ( #8755 )
2018-09-25 12:19:32 -05:00
Brian Ng
9b4b436e1f
Fix parsing of newline between 'async' and 'function' ( #8698 )
2018-09-16 22:09:23 -05:00
Brian Ng
380f2a0297
Fix typescript parsing typed object shorthand methods ( #8677 )
2018-09-14 10:20:59 -05:00
Brian Ng
58017044a3
Bump flow to 0.80 and fix sourceType error ( #8630 )
2018-09-05 09:00:53 -05:00
Sven Sauleau
07fae82a8a
fix(types): missing unambiguous sourceType ( #8610 )
2018-09-04 10:03:48 -05:00
Nicolò Ribaudo
9d244ae66b
More helpful error message for missing decoratorsBeforeExport in parser ( #8576 )
2018-08-29 09:02:18 -05:00
Justin Ridgewell
edbffda091
Cleanup getLineInfo ( #8540 )
...
Removes an ignore control comment
2018-08-26 13:27:06 -04:00
Justin Ridgewell
72ee1816a4
Update to ES6 String methods ( #8541 )
2018-08-26 13:26:51 -04:00
Justin Ridgewell
524d847763
Flatten TokenType class hierarchy ( #8537 )
...
`KeywordTokenType` and `BinopTokenType` were just meant to be factory
helpers, there's no reason for a class hierarchy.
2018-08-25 20:02:32 -04:00
Justin Ridgewell
5899940156
Update parser whitespace for clarity ( #8539 )
...
* Update parser whitespace for clarity
Has the nice benefit of not requiring a charCode to String conversion.
* Remove test262 exceptions
Per https://github.com/tc39/ecma262/pull/1218#issuecomment-395340891 ,
ECMA262 follows whatever the latest Unicode version specifies for Zs
Space_Separator category. MONGOLIAN VOWEL SEPARATOR was moved to the Cf
Other_Format category in Unicode 8.
2018-08-25 19:12:38 -04:00
Yi Li
b439013cd4
Fix trailingComments for FunctionExpression that is CallExpression arguments ( #8488 )
2018-08-21 12:29:11 -05:00
dnalborczyk
ab8555a867
Update dependencies ( #8364 )
2018-08-17 10:26:25 -05:00
Nicolò Ribaudo
d79b5eeeff
Require decoratorsBeforeExport option for decorators ( #8465 )
...
* Require decoratorsBeforeExport option for syntax-decorators
* Also babylon
* Enable test
2018-08-15 09:04:52 +02:00
James DiGioia
122906d525
Verify if MemberExpression is computed
...
If a property access is computed, e.g. a[b], then it's in topic style. Currently,
this isn't accounted for. Test & change ensures this doesn't parse.
2018-08-10 08:06:38 -04:00
James DiGioia
25d01460fd
Fix error message for #4 case
...
This impact private fields as well as smart pipeline, providing a clearer
error message for both.
2018-08-10 07:52:55 -04:00
James DiGioia
15e6d844ae
Remove additional parser logic
...
These are parsable only in follow-on proposals, not in the base proposal,
so we'll introduce that in a separate PR.
2018-08-09 22:08:23 -04:00
James DiGioia
d1cae2dec2
Remove unneeded comment
...
This is no longer true, now that we return `tt.hash`.
2018-08-09 21:10:43 -04:00
James DiGioia
11aee13ff2
Swap Yoda condition
2018-08-09 21:04:47 -04:00
kalenikalexander
5c728ea609
Fix private property parsing in Flow ( #8340 )
...
* Fix private property parsing in Flow
* Flow tests updated
* Fix type error
* Appropriate name was given to test folder
* Fix
* Empty
* Correct type annotation
* Add required changes in generator package
* Add required changes in flow-strip-types
2018-08-02 08:38:58 +02:00
Brian Ng
55ca90b3fc
Allow TSInterfaceDeclaration to be default export ( #8408 )
...
<!--
Before making a PR, please read our contributing guidelines
https://github.com/babel/babel/blob/master/CONTRIBUTING.md
For issue references: Add a comma-separated list of a [closing word](https://help.github.com/articles/closing-issues-via-commit-messages/ ) followed by the ticket number fixed by the PR. (it should be underlined in the preview if done correctly)
If you are making a change that should have a docs update: submit another PR to https://github.com/babel/website
-->
| Q | A <!--(Can use an emoji 👍 ) -->
| ------------------------ | ---
| Fixed Issues? | Fixes #7118
| Patch: Bug Fix? | Y
| Major: Breaking Change? | N
| Minor: New Feature? | N
| Tests Added + Pass? | Yes
| Documentation PR Link |
| Any Dependency Changes? |
| License | MIT
2018-07-31 12:57:57 -05:00
Andy
8ee24fdfc0
TypeScript: Support type arguments on tagged templates ( #7754 )
...
| Q | A
| ------------------------ | ---
| Fixed Issues? | #7747 (partly)
| Patch: Bug Fix? |
| Major: Breaking Change? |
| Minor: New Feature? | Yes
| Tests Added + Pass? | Yes
| Documentation PR |
| Any Dependency Changes? |
| License | MIT
@JamesHenry This changes the AST format. CC @DanielRosenwasser for review.
Supports parsing type arguments on tagged template calls.
Should wait on Microsoft/TypeScript#23430 to be merged so we're sure we have the final syntax.
2018-07-26 10:44:43 -05:00
Kevin Gibbons
a811cf78e1
Correctly parse interface methods named 'static' ( #8374 )
2018-07-24 09:25:55 +02:00
James DiGioia
39e7ee6e65
Switch Pipeline types to extend NodeBase
...
This doesn't work because the `type` values are not compatible.
2018-07-22 18:55:12 -04:00
James DiGioia
094ef31c01
Wrap callback in try/finally
...
This ensures we clean up always if the callback throws.
2018-07-22 18:52:07 -04:00
James DiGioia
afd0638b74
Reuse hash token instead of new primaryTopicToken
...
Set whether we're in a pipeline in order to determine how to parse the
hash. The error message changes as a result, since the `hash` never
enters the block.
2018-07-22 18:46:31 -04:00
James DiGioia
6e41edb90f
Fix TopicContextState type in Flow
2018-07-22 17:58:51 -04:00
dnalborczyk
8b10a44fe1
remove .then from dynamic import parser exception message ( #8355 )
2018-07-21 08:26:17 +02:00
James DiGioia
7931f4c241
Rename topicContextState -> .topicContext
2018-07-12 23:11:55 -04:00
James DiGioia
b847d40842
Inline readTopicContextState method
2018-07-12 23:10:07 -04:00
James DiGioia
e91a02cc49
Reuse declared type in function return value
2018-07-12 23:08:11 -04:00
James DiGioia
cc526940ee
Quote proposals in error message
2018-07-12 23:07:09 -04:00
James DiGioia
7188820151
Delete commented code
2018-07-12 22:55:01 -04:00
James DiGioia
00845709ce
Add comment for number sign
2018-07-12 22:48:53 -04:00
James DiGioia
b50fdc191e
Inline function checkSmartPipelineHeadEarlyErrors
...
It's only used once.
2018-07-12 22:47:45 -04:00
James DiGioia
ef0f723fc5
Reverse yoda conditions
...
If "smart" proposal is, we'll no longer say.
2018-07-12 22:46:34 -04:00
Andy
301db1b921
TypeScript: Support type arguments on JSX opening and self-closing tags ( #7799 )
2018-07-10 17:19:42 -05:00
J. S. Choi
fbf62b4830
Implement Smart Pipeline proposal in @babel/parser
2018-07-09 22:44:27 -04:00
James DiGioia
19a1705293
Support pipeline proposal flag in @babel/parser ( #8291 )
2018-07-09 16:59:56 -04:00
dnalborczyk
db1385fb82
upgrades eslint v5 (major), babel-eslint, eslint-plugin-flowtype, eslint-plugin-prettier ( #8259 )
...
* upgrade eslint v5 (major), babel-eslint (minor), eslint-plugin-flowtype (minor), eslint-plugin-prettier (patch)
* fix makefile: remove (default) .js file extension, remove non-existing glob pattern
* fix linting errors
* add '*.js' glob back to include babel.config.js for linting
2018-07-05 09:17:01 -05:00
Ger Hobbelt
07c88e6f0b
Use charCodes at more places in the parser ( #8176 )
2018-06-15 13:21:32 +02:00
Ger Hobbelt
ba98cf782a
Removed constant condition in parser ( #8177 )
2018-06-15 13:14:14 +02:00
晏兵兵
106907e605
fix: import Parser as type ( #8146 ) [skip ci]
2018-06-12 13:42:10 -04:00
Brian Ng
b6455c611b
Allow ts modifier names to be used as function argument names ( #8030 )
2018-06-12 08:38:38 -05:00