babel-source 5.8.31 → 5.8.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +8 -8
  2. data/lib/babel.js +37 -34
  3. data/lib/babel/source.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MmZhMDc2ZTQ0NDU3ZDM3M2Q0YWE0NDg1YTEyODYzOGM0NDZmNjBmNQ==
4
+ YmVhZjg4YjY2MjI1YjFmZGY3OGU5ZjE5NGZmMGFhMTI5MTIyODE1Mw==
5
5
  data.tar.gz: !binary |-
6
- MzMwZGRhNjA1YjY3MGJlMDlmZTdmZmNkZGYwNTZmYjAxZjU2OTJmNw==
6
+ N2UxYTRhZjc1NWQyOGZlYmQzZjczOWI3NmQ2ZmI1ZjM4MmUwYzdkMA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmIwMDY5NDVkMjE1Yjg5ZDM5ZGM3YThiODYxOGZkOGEzMGMxNDkwZjQ2ZDU3
10
- ZGM0NTg0NTY3MGZhZDljYmU0YzFlOGQ0MDM5N2E5NjEzZjcwNWM5ZDE5N2Q2
11
- Y2U3MTFkZGNhOTZkOGEyYzY0MzQzMDRjNWI5ZTliZWQ2OTBjYmI=
9
+ ZTY1MTYwMTMwYzI5ODc1Zjg3MGIyNzQ1OGY4ODIyZjhmNWNjYjRhOWFjYzY2
10
+ ZWI0ZTNjNzUyODY0MzJjMjlmYjYwMzE4NTQ5ODY5N2JiMDA3MmQwODVkMzhl
11
+ ZTg0YTRhZGI5ZDQwNTZhY2RlNWJiOTY0YzBjMzkzNjk3MThiMjM=
12
12
  data.tar.gz: !binary |-
13
- YjhjMTNhNjEyMzFmMTEwNjVjZTQzN2Q0ZjkwYWI4YzZmOTAzYzliNGRhMTFm
14
- OThjZWYyOTFmMjJmYzczOTU0Yzk1NmFhYjI1NWRlZTk1MTQwMDUwNjM0Y2Q1
15
- ZmExMWJlNmYwMjJiYTBlNTlmMzk0NTgwM2ZjNmFiMTM2OGFhN2M=
13
+ MzU5ZmEwYWJjYTY4NjU0ODM5YjBjZmFkYWU4ODMyODQ2OTYxODg3MTRlMThh
14
+ MjllZjhlMWViZWFiYWYyMTc3MmU5NGYyMjIzMjdiZTIzYmIxYWQ1MDMwZDI0
15
+ MzU5YTRjMmU1NmQ0MWU4MTRmODg1MmEzMDNhYmFmNzg5YjZlYTQ=
@@ -24958,7 +24958,7 @@ var Scope = (function () {
24958
24958
  if (path.isLabeledStatement()) {
24959
24959
  this.registerBinding("label", path);
24960
24960
  } else if (path.isFunctionDeclaration()) {
24961
- this.registerBinding("hoisted", path.get("id"));
24961
+ this.registerBinding("hoisted", path.get("id"), path);
24962
24962
  } else if (path.isVariableDeclaration()) {
24963
24963
  var declarations = path.get("declarations");
24964
24964
  var _arr6 = declarations;
@@ -25002,46 +25002,49 @@ var Scope = (function () {
25002
25002
  */
25003
25003
 
25004
25004
  Scope.prototype.registerBinding = function registerBinding(kind, path) {
25005
- if (!kind) throw new ReferenceError("no `kind`");
25005
+ var bindingPath = arguments.length <= 2 || arguments[2] === undefined ? path : arguments[2];
25006
+ return (function () {
25007
+ if (!kind) throw new ReferenceError("no `kind`");
25006
25008
 
25007
- if (path.isVariableDeclaration()) {
25008
- var declarators = path.get("declarations");
25009
- var _arr8 = declarators;
25010
- for (var _i8 = 0; _i8 < _arr8.length; _i8++) {
25011
- var declar = _arr8[_i8];
25012
- this.registerBinding(kind, declar);
25009
+ if (path.isVariableDeclaration()) {
25010
+ var declarators = path.get("declarations");
25011
+ var _arr8 = declarators;
25012
+ for (var _i8 = 0; _i8 < _arr8.length; _i8++) {
25013
+ var declar = _arr8[_i8];
25014
+ this.registerBinding(kind, declar);
25015
+ }
25016
+ return;
25013
25017
  }
25014
- return;
25015
- }
25016
25018
 
25017
- var parent = this.getProgramParent();
25018
- var ids = path.getBindingIdentifiers(true);
25019
+ var parent = this.getProgramParent();
25020
+ var ids = path.getBindingIdentifiers(true);
25019
25021
 
25020
- for (var name in ids) {
25021
- var _arr9 = ids[name];
25022
+ for (var name in ids) {
25023
+ var _arr9 = ids[name];
25022
25024
 
25023
- for (var _i9 = 0; _i9 < _arr9.length; _i9++) {
25024
- var id = _arr9[_i9];
25025
- var local = this.getOwnBinding(name);
25026
- if (local) {
25027
- // same identifier so continue safely as we're likely trying to register it
25028
- // multiple times
25029
- if (local.identifier === id) continue;
25025
+ for (var _i9 = 0; _i9 < _arr9.length; _i9++) {
25026
+ var id = _arr9[_i9];
25027
+ var local = this.getOwnBinding(name);
25028
+ if (local) {
25029
+ // same identifier so continue safely as we're likely trying to register it
25030
+ // multiple times
25031
+ if (local.identifier === id) continue;
25030
25032
 
25031
- this.checkBlockScopedCollisions(local, kind, name, id);
25032
- }
25033
+ this.checkBlockScopedCollisions(local, kind, name, id);
25034
+ }
25033
25035
 
25034
- parent.references[name] = true;
25036
+ parent.references[name] = true;
25035
25037
 
25036
- this.bindings[name] = new _binding2["default"]({
25037
- identifier: id,
25038
- existing: local,
25039
- scope: this,
25040
- path: path,
25041
- kind: kind
25042
- });
25038
+ this.bindings[name] = new _binding2["default"]({
25039
+ identifier: id,
25040
+ existing: local,
25041
+ scope: this,
25042
+ path: bindingPath,
25043
+ kind: kind
25044
+ });
25045
+ }
25043
25046
  }
25044
- }
25047
+ }).apply(this, arguments);
25045
25048
  };
25046
25049
 
25047
25050
  /**
@@ -25210,7 +25213,7 @@ var Scope = (function () {
25210
25213
  // FunctionExpression - id
25211
25214
 
25212
25215
  if (path.isFunctionExpression() && path.has("id")) {
25213
- this.registerBinding("local", path.get("id"));
25216
+ this.registerBinding("local", path.get("id"), path);
25214
25217
  }
25215
25218
 
25216
25219
  // Class
@@ -61642,7 +61645,7 @@ resolve.relative = function (loc) {
61642
61645
  },{"1":1,"10":10}],609:[function(_dereq_,module,exports){
61643
61646
  module.exports={
61644
61647
  "name": "babel-core",
61645
- "version": "5.8.31",
61648
+ "version": "5.8.32",
61646
61649
  "description": "A compiler for writing next generation JavaScript",
61647
61650
  "author": "Sebastian McKenzie <sebmck@gmail.com>",
61648
61651
  "homepage": "https://babeljs.io/",
@@ -1,7 +1,7 @@
1
1
  module Babel
2
2
  module Source
3
- VERSION = "5.8.31"
4
- DATE = Time.at(1446073055)
3
+ VERSION = "5.8.32"
4
+ DATE = Time.at(1446074116)
5
5
  PATH = File.expand_path("../..", __FILE__)
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: babel-source
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.8.31
4
+ version: 5.8.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian McKenzie