Rick Waldron
2f5d146d54
Don't treat e, b, E, B as forbidden siblings for hex literals. ( #549 )
2017-05-30 18:14:31 -05:00
Rick Waldron
b344f62056
NumberLiteralSeparator: Stage 1 feature plugin. Closes gh-538 ( #541 )
...
* NumberLiteralSeparator: Stage 1 feature plugin
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
* fix-up per review
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
* nit: forbiddenNumericLiteralSeparatorSibling -> forbiddenNumericLiteralSeparatorSiblings
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
* fix-up to change includes -> indexOf
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-05-26 16:37:05 -04:00
Diego Ferreiro Val
01da62283c
Modify grammar to support Private Fields proposal: ( #260 )
...
* Modify grammar to support Private Fields proposal:
- Adding optional plugin `classPrivateProperties`
- Adding PrivateName type identifier
- Adding ClassPrivateProperty to ClassBody
- Allow PrivateName in MemberExpression
- Allow PrivateName as a reference
- Adding tests
* Remove unnecesary liberal parameter
* Guarding for plugin dependecy for future versioning
* update spec.md [skip ci]
* move comment [skip ci]
* remove unused param [skip ci]
* Refactor PrivateName to contain Identifier in name property
2017-05-22 11:33:48 -04:00
Daniel Tschinder
d605a9a4de
Fix flow errors ( #517 )
2017-05-11 00:04:43 +02:00
Andy
1773ca7457
Type-check State ( #492 )
2017-05-10 21:55:09 +02:00
Brian Ng
d33c82781a
Allow super in class properties ( #499 )
2017-05-02 14:41:10 -04:00
Andy
8288f7d9e4
Type-check tokenizer/types.js ( #493 )
2017-04-27 10:53:17 -04:00
Andy
e1a06544bc
Type-check utils ( #491 )
...
* Type-check utils
* Improve test coverage
2017-04-27 10:23:13 -04:00
Andy
34acecca2e
Type-check CommentsParser and LocationParser ( #484 )
2017-04-25 16:07:01 -04:00
Andy
c4fb3fe742
Convert each file with parser methods to a class in an inheritance chain ( #481 )
2017-04-24 00:40:49 +02:00
Alex Kuzmenko
00d6db9fbb
Fixed invalid number literal parsing ( #473 )
...
* Fixed invalid number literal parsing
* Don't ignore period or E characters after octal numbers
cherry-pick fix from acorn
* Fix tests
2017-04-21 15:22:50 +02:00
Andy
5e156310ca
Type-check tokenizer/index.js ( #460 )
...
* Type-check tokenizer/index.js
* Update test baselines
2017-04-21 14:25:31 +02:00
Alex Kuzmenko
22741a8068
Fix number parser ( #433 )
...
Fixed number parser #2
Added one more test
2017-04-03 22:25:29 +02:00
Kevin Gibbons
fab343e379
Add support for invalid escapes in tagged templates ( #274 )
...
Per the stage-3 TC39 proposal:
https://github.com/tc39/proposal-template-literal-revision
2017-03-21 16:50:34 -04:00
Brian Ng
09bb9bc6be
Fix parsing yield with dynamicImport ( #383 )
2017-02-28 12:43:34 -05:00
Raphael Mu
f25a2fbc78
add startLine option ( #346 )
2017-02-10 15:06:28 +01:00
Daniel Tschinder
b918554d73
Correct indent eslint rule config ( #276 )
...
* Change indent rule to correctly lint
* Remove rule again
2017-01-14 15:11:50 +01:00
Sven SAULEAU
ed13a4ab05
Refactor tokenizer types file ( #263 )
...
* refactor(tokenizer): use class for keywork tokens
* refactor(tokenizer): re-use constacts in types
* refactor(tokenizer): binop token type
* feat(tokenizer): use beforeAndStartExpr for shortcut
* fix(tokenizer): typo in keywordTokenType
* refactor(tokenizer): don't use spread operator
* refactor(tokenizer): constant for isLoop, isAssign, prefix, postfix
* fix(tokenizer): remove constant beforeAndStartExpr
* style(tokenizer): space after comma
2017-01-10 20:22:56 +01:00
greenkeeper[bot]
6773279039
Update eslint-config-babel to the latest version 🚀 ( #273 )
...
* chore(package): update eslint-config-babel to version 4.0.0
https://greenkeeper.io/
* Fix prefer-const
* Update package.json
2017-01-10 19:42:43 +01:00
Vladimir Kurchatkin
3267e5f365
Don't set inType flag when parsing property names ( #266 )
...
* Don't set inType flag when parsing property names
* Add inPropertyName type definition
* Move inPropertyName check before this.curContext()
2017-01-05 12:25:57 +01:00
Gabe Levi
643124744f
Optional names for function types and object type indexers ( #197 )
...
* Use .gitattributes to ignore files with weird newlines
* [Flow] Make parameter names in function types optional
* [Flow] Anonymous function types with single params can omit parens
* [Flow] Optional names for object indexer keys
* Add noAnonFunctionType explicitly to state
* Adjust gitattributes as files have been fixed
2016-11-09 16:22:53 +01:00
Daniel Tschinder
0d72a89df6
Fix flowtype and add inType to state ( #189 )
...
this improves the performance slightly
2016-10-17 10:45:46 -04:00
Daniel Tschinder
952d50faf9
Make exportIdentifiers and array so that base object properties are not accounted ( #137 )
2016-09-22 16:00:39 -04:00
Kai Cataldo
650e33376a
Disallow duplicate named exports ( #107 )
...
fixes #69
2016-09-22 10:20:47 -04:00
Basil Hosmer
ddbda7dd04
exact object type annotations for Flow plugin ( #104 )
...
* exact object type annotations for Flow plugin
* Couple tweaks per suggestions
* s/==/===/
* add test for unexpected token in flowObjectType Semicolon
2016-09-13 10:07:23 -04:00
Daniel Tschinder
4506822180
Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas ( #98 )
...
* This removes the exponentiationOperator as it is now in es2016
* Remove from tests
* Remove asyncFunctions and restructure test dirs
* Remove trailingFunctionCommas
2016-08-23 17:11:01 -04:00
Daniel Tschinder
88d7e2012c
Fix lookahead to not add comments to arrays which are not cloned ( #76 )
...
We do not clone arrays in lookahead() but comments were added
to leading/trailing arrays during lookahead, leading to leak to the next next() call.
Also extracted parsing of JSXSpreadChild to own parse function.
2016-07-17 11:08:25 +02:00
Sebastian McKenzie
cf6e0d365e
rename parser context types
2016-06-22 14:06:58 +01:00
Amjad Masad
aca8010438
Remove remaining @flow annotations
2016-03-03 15:10:59 -08:00
Amjad Masad
b5315d4b27
Revert "Remove Flow annotations and pragmas"
...
This reverts commit 4252244d06b225ab26a02d52c04f9940a3e4d6a2.
2016-03-03 15:03:55 -08:00
Amjad Masad
9a180797c0
Revert "Remove flow"
...
This reverts commit 2827ff6b01dcce69e9d3c0402e96b52b3a2a47ee.
2016-03-03 14:49:20 -08:00
Sam Goldman
d6ee428857
Remove flow
2016-03-01 22:33:30 -08:00
Sam Goldman
08249b29e4
Remove weird codemod artifact
2016-02-28 13:23:28 -10:00
Sam Goldman
085361ad1a
Remove Flow annotations and pragmas
2016-02-28 13:18:57 -10:00
Sebastian McKenzie
31f3eba4c1
Merge pull request #3361 from babel/klint
...
Switch to klint, fix some lint rules
2016-02-14 23:26:30 +00:00
Sebastian McKenzie
c9f9435445
Switch to klint, fix some lint rules
2016-02-14 23:25:14 +00:00
Logan Smyth
40e5f505f4
Properly fail to parse >== and <== - fixes T2921
2016-02-13 10:08:05 -08:00
Henry Zhu
5f0ece0bdb
add some more flow types
2016-02-04 11:07:03 -05:00
Daniel Lo Nigro
20a483cd58
Fix Flow.
...
Removed `@flow` annotation from files that don't actually pass Flow check at the moment. These will be added back file by file once the files are properly converted to use Flow.
Closes #3064
2015-11-15 21:30:22 -08:00
Jordan Klassen
021688e1c0
Remove unused second parameter of isIdentifierStart
2015-11-12 22:45:35 -08:00
Sebastian McKenzie
4016bae694
add ExistentialTypeParam - fixes #2587
2015-11-03 13:48:03 +00:00
Sebastian McKenzie
14ca4d1dc9
add lineBreak test to tt.name.updateContext - fixes #2591
2015-11-03 11:46:01 +00:00
Sebastian McKenzie
b909a81ab7
6.0.0
...
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
2015-10-29 17:51:24 +00:00
Sebastian McKenzie
6d6ddf0bcd
type annotate babylon
2015-09-23 15:59:41 +01:00
Sebastian McKenzie
59948c6649
add babylon hasFeature util method
2015-09-15 06:15:19 +01:00
Sebastian McKenzie
6e24626482
fix weird legacy acorn formatting
2015-08-24 15:31:41 -04:00
Sebastian McKenzie
032ca7ae1c
never attempt to represent regexes natively
2015-08-24 15:31:30 -04:00
Sebastian McKenzie
ac9ee75dac
parser: don't mutate or clone state arrays when doing a lookahead - fixes #2211
2015-08-15 19:07:42 -04:00
Sebastian McKenzie
8887444cf7
fix various bugs surfaced by the esprima test suite, remove some incorrect tests
2015-08-11 16:58:20 +01:00
Henry Zhu
8f3615bf7b
fix unexpected token issue for regex after block case
...
- Ex: `if (1) {} /foo/`
Fixes babel/babel-eslint#161
Ref marijnh/acorn#289
2015-08-10 19:03:13 -04:00