Browse Source

Make sure that `Identifiers` all have a `module` property.

gh-109
Oskar Segersvärd 10 years ago
parent
commit
c4ed475889
  1. 4
      src/Module.js

4
src/Module.js

@ -111,6 +111,7 @@ export default class Module {
originalName: 'default', originalName: 'default',
name: 'default', name: 'default',
module: this,
statement, statement,
localName: 'default', localName: 'default',
identifier, identifier,
@ -121,7 +122,7 @@ export default class Module {
this.exports.define( id ); this.exports.define( id );
// Rename it to avoid generating the `default` idenntifier, // Rename it to avoid generating the `default` identifier,
// which is invalid. // which is invalid.
id.name = this.name; id.name = this.name;
} }
@ -159,6 +160,7 @@ export default class Module {
originalName: name, originalName: name,
name, name,
module: this,
statement, statement,
localName: name, localName: name,
expression: declaration expression: declaration

Loading…
Cancel
Save