1 | var util = require('util');
|
2 | var helpers = require('../helpers');
|
3 |
|
4 | var VariableDeclaration = module.exports = function(declarations, kind) {
|
5 | this.type = 'VariableDeclaration';
|
6 | this.declarations = declarations;
|
7 | this.kind = kind;
|
8 | this.async = false;
|
9 | if (!util.isArray(this.declarations)) {
|
10 | this.declarations = [this.declarations];
|
11 | }
|
12 | if (!this.kind) {
|
13 | this.kind = 'var';
|
14 | }
|
15 | };
|
16 |
|
17 | VariableDeclaration.prototype.normalize = function(place) {
|
18 | this.declarations.forEach(function (declaration) {
|
19 | declaration.normalize();
|
20 | });
|
21 | place.push(this);
|
22 | };
|
23 |
|
24 | VariableDeclaration.prototype.transform = function(place) {
|
25 | place.push(this);
|
26 | return place;
|
27 | };
|