Skip to content

Commit 5d1f4e7

Browse files
committed
glayzzle#62 make use nodes consistent with other by avoiding identifier node usage
1 parent f9d40ed commit 5d1f4e7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/ast/namespace.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var KIND = 'namespace';
1212
* The main program node
1313
* @constructor Namespace
1414
* @extends {Block}
15-
* @property {Identifier} name
15+
* @property {String} name
1616
* @property {Boolean} withBrackets
1717
*/
1818
var Namespace = Block.extends(function Namespace(name, children, withBrackets, location) {

src/ast/usegroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var KIND = 'usegroup';
1111
* Defines a use statement (with a list of use items)
1212
* @constructor UseGroup
1313
* @extends {Statement}
14-
* @property {Identifier|null} name
14+
* @property {String|null} name
1515
* @property {String|null} type - Possible value : function, const
1616
* @property {UseItem[]} item
1717
* @see {Namespace}

src/ast/useitem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var KIND = 'useitem';
1111
* Defines a use statement (from namespace)
1212
* @constructor UseItem
1313
* @extends {Statement}
14-
* @property {Identifier} name
14+
* @property {String} name
1515
* @property {String|null} type - Possible value : function, const
1616
* @property {String|null} alias
1717
* @see {Namespace}

src/parser/namespace.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module.exports = {
9797
if (this.token === ',') {
9898
items = items.concat(this.next().read_use_declarations(false));
9999
} else if (this.token === '{') {
100-
name = items[0].name;
100+
name = items[0].name.name;
101101
items = this.next().read_use_declarations(type === null);
102102
this.expect('}') && this.next();
103103
}
@@ -117,7 +117,7 @@ module.exports = {
117117
if (typed) type = this.read_use_type();
118118
var name = this.read_namespace_name();
119119
var alias = this.read_use_alias();
120-
return result(name, alias, type);
120+
return result(name.name, alias, type);
121121
}
122122
/**
123123
* Reads a list of use declarations

0 commit comments

Comments
 (0)