29 Commits

Author SHA1 Message Date
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
b918554d73 Correct indent eslint rule config (#276)
* Change indent rule to correctly lint

* Remove rule again
2017-01-14 15:11:50 +01:00
Daniel Tschinder
5785f0ce72 Merge branch 'master' into 7.0 2017-01-12 22:42:25 +01:00
Mathias Bynens
ed625cb2e1 Remove String.fromCodePoint shim (#279)
This is not necessary anymore if we drop support for Node.js v0.10 and v0.12.

Ref. https://github.com/babel/babel/issues/4315.
2017-01-10 20:14:11 +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
Ryan Duffy
1c13800efd Use fromCodePoint to convert high value unicode entities (#243)
* Use fromCodePoint to convert high value unicode entities

* Include polyfill for String.fromCodePoint

* copy and adapt fromCodePoint into String.fromcodepoint

In order to avoid modifying String as the polyfill does, I've copied
the source from the polyfill and adapted it return the polyfill
function if the native version does not exist. Once support for node
versions that lack fromCodePoint is dropped, this polyfill can be
removed.

* move license notice to top of file
2017-01-02 10:15:56 +01:00
James Long
ba96b91f40 Fix source location for JSXEmptyExpression nodes (fixes #248) (#249) 2016-12-14 16:32:36 -05: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
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
3fad8cc9a7 Merge pull request #42 from calebmer/feat/jsx-spread-children
Add JSX spread children
2016-07-13 01:32:09 +01:00
Sebastian McKenzie
cf6e0d365e rename parser context types 2016-06-22 14:06:58 +01:00
calebmer
a25a4ffdc1 Add JSX spread children 2016-06-19 10:48:20 -04:00
Yiyuan Bai
de56e12c68 Allow use react elements after yield statement 2016-05-12 18:41:41 +08:00
Sebastian McKenzie
c9f9435445 Switch to klint, fix some lint rules 2016-02-14 23:25:14 +00: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
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
446b297465 unoverload Literal AST node 2015-09-01 04:49:16 +01:00
Sebastian McKenzie
53952cb765 fix syntax error 2015-07-29 16:43:52 +01:00
Sebastian McKenzie
ffee5615e4 clear rawValue from JSX attribute values as they're tokenised and parsed differently - fixes #2114 2015-07-29 16:15:47 +01:00
Sebastian McKenzie
671196dffa remove rawValue property from JSX inner text Literal nodes 2015-07-26 05:30:27 +01:00
Sebastian McKenzie
e229f8ea55 remove gross acorn conditional statement styling 2015-07-26 05:22:33 +01:00
Sebastian McKenzie
c2c8b2db57 add token match method and remove more dead code 2015-07-26 04:48:42 +01:00
Sebastian McKenzie
23aa7b002d improve babylon test coverage and remove dead code 2015-07-25 19:54:19 +01:00
Sebastian McKenzie
2948108c90 finish reorganisation of babylon 2015-07-25 08:03:39 +01:00
Sebastian McKenzie
e7fec51feb remove range property from nodes, clean up babylon codebase 2015-07-25 07:07:22 +01:00
Sebastian McKenzie
ff6620c8ea more architectural changes 2015-07-11 20:56:26 +01:00
Sebastian McKenzie
423d8c510d Begin transition of Babel to a more scalable architecture, async flow to allow for RPC and better build system for multiple packages 2015-07-11 12:39:54 +01:00