Compare commits

...

7 Commits

Author SHA1 Message Date
Sebastian McKenzie
27f039488e v5.5.8 2015-06-13 18:53:41 +01:00
Sebastian McKenzie
e3ce82e12f remove console.log 2015-06-13 18:50:51 +01:00
Sebastian McKenzie
4934ea56a0 change NodePath#inType to use arguments instead of types 2015-06-13 18:50:19 +01:00
Sebastian McKenzie
ce03457b19 add getOpposite path method 2015-06-13 18:50:05 +01:00
Sebastian McKenzie
1298c67949 rename getOwnBindingInfo to getOwnBinding 2015-06-13 18:49:59 +01:00
Sebastian McKenzie
668274edcb remove resolve-rc file 2015-06-13 18:49:37 +01:00
Sebastian McKenzie
0694a7dd06 5.5.7 2015-06-13 02:23:28 +01:00
8 changed files with 24 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "babel-core",
"description": "A compiler for writing next generation JavaScript",
"version": "5.5.7",
"version": "5.5.8",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",

View File

@@ -1,14 +1,14 @@
{
"name": "babel",
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
"version": "5.5.6",
"version": "5.5.7",
"author": "Sebastian McKenzie <sebmck@gmail.com>",
"homepage": "https://babeljs.io/",
"license": "MIT",
"repository": "babel/babel",
"preferGlobal": true,
"dependencies": {
"babel-core": "^5.5.6",
"babel-core": "^5.5.7",
"chokidar": "^1.0.0",
"commander": "^2.6.0",
"convert-source-map": "^1.1.0",

View File

@@ -1,7 +1,7 @@
{
"name": "babel-runtime",
"description": "babel selfContained runtime",
"version": "5.5.6",
"version": "5.5.7",
"license": "MIT",
"repository": "babel/babel",
"author": "Sebastian McKenzie <sebmck@gmail.com>",

View File

@@ -1,5 +0,0 @@
console.trace("I know someone out there is hotlinking straight to this file. This is a " +
"PRIVATE API. I hate you, but I wont break your code just because you're a " +
"programmer who practices bad habits.");
export { default } from "../transformation/file/options/resolve-rc";

View File

@@ -71,7 +71,7 @@ var visit = function (node, name, scope) {
// check to see if we have a local binding of the id we're setting inside of
// the function, this is important as there are caveats associated
var bindingInfo = scope.getOwnBindingInfo(name);
var bindingInfo = scope.getOwnBinding(name);
if (bindingInfo) {
if (bindingInfo.kind === "param") {

View File

@@ -44,12 +44,10 @@ export function getAncestry() {
* Description
*/
export function inType(types) {
if (!Array.isArray(types)) types = [types];
export function inType() {
var path = this;
while (path) {
for (var type of (types: Array)) {
for (var type of (arguments: Array)) {
if (path.node.type === type) return true;
}
path = path.parentPath;

View File

@@ -23,6 +23,18 @@ export function getStatementParent(): ?NodePath {
return path;
}
/**
* Description
*/
export function getOpposite() {
if (this.key === "left") {
return this.getSibling("right");
} else if (this.key === "right") {
return this.getSibling("left");
}
}
/**
* Description
*/

View File

@@ -279,7 +279,7 @@ export default class Scope {
/**
* Determine whether evaluating the specific input `node` is a consequenceless reference. ie.
* evaluating it wont result in potentially arbitrary code from being ran. The following are
* whitelisted and determined not cause side effects:
* whitelisted and determined not to cause side effects:
*
* - `this` expressions
* - `super` expressions
@@ -492,7 +492,7 @@ export default class Scope {
for (var name in ids) {
var id = ids[name];
var local = this.getOwnBindingInfo(name);
var local = this.getOwnBinding(name);
if (local) {
// don't ever let a type alias shadow a local binding
if (kind === "type") continue;
@@ -819,7 +819,7 @@ export default class Scope {
var scope = this;
do {
var binding = scope.getOwnBindingInfo(name);
var binding = scope.getOwnBinding(name);
if (binding) return binding;
} while (scope = scope.parent);
}
@@ -828,7 +828,7 @@ export default class Scope {
* Description
*/
getOwnBindingInfo(name: string) {
getOwnBinding(name: string) {
return this.bindings[name];
}
@@ -855,7 +855,7 @@ export default class Scope {
*/
hasOwnBinding(name: string) {
return !!this.getOwnBindingInfo(name);
return !!this.getOwnBinding(name);
}
/**