Kevin Gibbons
81056eeee7
Fix parsing of class properties ( #351 )
2017-03-10 12:43:45 +01:00
Brian Ng
c8c71684c4
Don't consume async when checking for async func decl ( #377 )
2017-03-01 12:11:48 -05:00
Andrew Levine
aec4beff0c
Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ( #300 )
2017-03-01 11:55:24 +01:00
Henry Zhu
5e0cce4974
Merge branch 'master' into 7.0
2017-02-28 14:37:13 -05:00
Henry Zhu
8d90dc0d10
[7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement ( #384 )
...
* [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement
* Fix rest element in array pattern at invalid location
2017-02-28 12:31:58 -05:00
Henry Zhu
2dd57d17b9
Revert "Fix export default async function to be FunctionDeclaration" ( #375 )
2017-02-23 09:50:33 -05:00
Henry Zhu
b0f8405b52
Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ( #376 )
2017-02-23 09:50:25 -05:00
Kevin Gibbons
561d4f74b0
Forbid semicolons after decorators in classes ( #352 )
2017-02-22 16:24:40 +01:00
Brian Ng
ad8d520406
Ensure takeDecorators is called on exported class ( #358 )
2017-02-22 16:22:38 +01:00
Daniel Tschinder
d88befdd30
Merge branch 'master' into 7.0
...
# Conflicts:
# src/parser/index.js
2017-02-12 13:32:06 +01:00
Daniel Tschinder
4bd682e90b
keywords are not allowed as local specifier ( #307 )
...
Also fix some error messages to be more specific
2017-02-10 14:58:44 +01:00
Brandon Dail
56928dca66
[7.0] Remove ForAwaitStatement, add await flag to ForOfStatement ( #349 )
...
* Remove ForAwaitStatement, add await flag to ForOfStatement
* Set await flag for all ForOfStatements
2017-02-09 17:37:03 -05:00
Daniel Tschinder
0309a5ba8a
Merge branch 'master' into 7.0
...
# Conflicts:
# src/parser/statement.js
# src/plugins/jsx/index.js
2017-01-27 23:12:20 +01:00
Daniel Tschinder
d2faddf0d9
Fix export default async function to be FunctionDeclaration ( #324 )
2017-01-27 19:43:06 +01:00
Andrew Levine
9929baaca8
Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ( #300 )
2017-01-23 23:56:39 +01:00
Daniel Tschinder
b6c3b5aa83
Cleanup and splitup parser functions ( #295 )
...
This makes it easier to integrate the estree plugin.
2017-01-20 23:52:16 +01:00
Daniel Tschinder
d5cd2c3231
Allow imports in declare module ( #315 )
...
* Allow imports in declare module {}
* Rename bodyElement to bodyNode
2017-01-20 22:19:50 +01:00
Brian Ng
c5462e1a30
Remove classConstructorCall plugin ( #291 )
2017-01-16 10:49:42 +01:00
greenkeeper[bot]
68a173c97c
Update eslint-config-babel to the latest version 🚀 ( #299 )
...
* chore(package): update eslint-config-babel to version 6.0.0
https://greenkeeper.io/
* Fix linting
2017-01-15 11:12:49 +01:00
Brian Ng
9d78213ab6
Improve error message on attempt to destructure named import ( #288 )
2017-01-14 15:38:30 +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
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
Jeff Morrison
9ea4e9dead
Add support for Flow shorthand import type ( #267 )
2017-01-03 10:52:18 +01:00
Alex Rattray
68bb1c6598
Allow this.state.clone() when parsing decorators ( #262 )
...
Adding the line `this.state = this.state.clone();` in a parser plugin
(specifically, in my case `parseExprAtom`)
would break decorators.
This change fixes that.
2017-01-02 10:37:05 +01:00
Kai Cataldo
5fb4353778
Throw error when exporting non-declaration ( #241 )
...
* Throw error when exporting non-declaration
fixes #238
* Do check ahead of parsing export statement
2016-12-01 21:03:13 +01:00
Moti Zilberman
7c18bf83cc
Increase test coverage ( #175 )
...
* Increase test coverage
* Test for error when binding `this` in destructuring pattern
* Ignore coverage of inAsync check in parseAwait - already checked externally
* Ignore coverage of default case in checkPropClash
* Remove unused parameter isAsync from parseParenAndDistinguishExpression
* Ignore coverage of an `else` branch in flowParseTypeParameterDeclaration
* Flow: remove unused parameters to flowParseTypeAnnotatableIdentifier
* Flow: ignore coverage of pass-through throw statement in parseConditional
* Flow: Add test for error on property with type param
* Flow: ignore coverage of pass-through throw statements in parseMaybeAssign, parseArrow
* Add test for error on XML-style comment in module code
* Update test for error on method in object pattern
* Test for error: "Only '=' operator can be used for specifying default value"
2016-10-16 15:04:13 +02:00
Jordan Gensler
c63c1bc728
[dynamic-import] Implementing import() syntax ( #163 )
2016-10-14 14:54:21 -04:00
Daniel Tschinder
4c445fd5f8
Remove kcheck ( #173 )
2016-10-14 12:12:55 -04:00
Jeroen Engels
e14f93d1bb
Fix crash when exporting with destructuring and sparse array ( #170 )
...
* Create reproducible crash when exporting with destructuring and sparse array
* Fix crash when exporting with destructuring and sparse array
2016-10-12 19:36:08 -04:00
Kai Cataldo
7dd45f7465
Check for duplicate named exports in exported rest elements/properties ( #164 )
2016-10-10 10:10:16 -04:00
Kai Cataldo
76e69277d7
Check for duplicate named exports in exported destructuring assignments ( #144 )
...
* Check for duplicate named exports in exported destructuring assignments
* Refactor duplicate error reporting
* Remove unnecessary check
2016-10-04 15:06:26 +02:00
Henry Zhu
1d04d12794
Don't do the duplicate check if not an identifier ( #140 )
2016-09-23 00:44:13 -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
Moti Zilberman
774e6b446b
Rephrase "assigning/binding to rvalue" errors to include context ( #119 ) ( #123 )
...
* Rephrase "assigning/binding to rvalue" error messages with context (#119 )
* Fix code style in parser/lval.js
* istanbul ignore some unused branches in parser/lval.js
* Fix code style again in parser/lval.js
2016-09-22 12:02:20 -04:00
Kai Cataldo
650e33376a
Disallow duplicate named exports ( #107 )
...
fixes #69
2016-09-22 10:20:47 -04:00
Moti Zilberman
4e1fbd48d5
Add support for computed class property names ( #120 ) ( #121 )
2016-09-21 21:24:59 -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
Vladimir Kurchatkin
f0c7660980
move logic to flow plugin
2016-06-24 20:23:02 +03:00
Vladimir Kurchatkin
d5f75cb2f0
flow: allow generic method with name get or set
2016-06-24 19:47:30 +03:00
Kevin Smith
f81c281fc4
Parse for-await statements when asyncGenerators plugin is active
2016-04-05 13:33:49 -04: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
Sebastian McKenzie
c9f9435445
Switch to klint, fix some lint rules
2016-02-14 23:25:14 +00:00
Logan Smyth
0c35bbfc07
Revert "babylon: throw parse error if class properties do not have a semicolon (fixes T6873)"
...
This reverts commit 976edfc06740e434d1d5b136e28996a77f909403.
2016-02-06 18:36:31 -08:00
Logan Smyth
d9ade8a63a
Revert "babylon: fix error location for class properties with a missing semicolon"
...
This reverts commit f31099f383b52cf4fe1786188f6421529dea865b.
2016-02-06 18:36:22 -08:00
Henry Zhu
2f00b4c329
babylon: fix error location for class properties with a missing semicolon
2016-01-06 18:42:26 -05:00
Sebastian McKenzie
6c79639801
Merge pull request #3225 from hzoo/cp-semi
...
`babylon`: throw parse error if class properties do not have a semico…
2016-01-06 15:22:37 +00:00
Sam Goldman
541b576c7a
Guard export interface against isExportDefaultSpecifier
2016-01-05 17:28:21 -08:00
Henry Zhu
e849c62144
babylon: throw parse error if class properties do not have a semicolon (fixes T6873)
2015-12-30 14:01:46 -05:00
Jesse McCarthy
b1da92e8cb
Don't make directive from parenthesized string.
2015-12-28 11:04:33 -05:00