UNPKG

1.85 kBJavaScriptView Raw
1void (function(){var _ion_runtime_BlockStatement_ = function(module,exports,require){'use strict';
2var ion = require('../'), Statement = require('./Statement');
3var BlockStatement = ion.defineClass({
4 name: 'BlockStatement',
5 properties: {
6 activate: function () {
7 BlockStatement.super.prototype.activate.apply(this, arguments);
8 if (!(this.statements != null)) {
9 var _ref = [];
10 {
11 var _ref2 = this.body;
12 for (var _i = 0; _i < _ref2.length; _i++) {
13 var s = _ref2[_i];
14 _ref.push(this.context.createRuntime(s));
15 }
16 }
17 this.statements = _ref;
18 }
19 {
20 var _ref3 = this.statements;
21 for (var _i2 = 0; _i2 < _ref3.length; _i2++) {
22 var statement = _ref3[_i2];
23 statement.activate();
24 }
25 }
26 },
27 deactivate: function () {
28 BlockStatement.super.prototype.deactivate.apply(this, arguments);
29 for (var i = this.statements.length - 1; i >= 0; i--) {
30 var statement = this.statements[i];
31 statement.deactivate();
32 }
33 }
34 }
35 }, Statement);
36module.exports = exports = BlockStatement;
37 }
38 if (typeof require === 'function') {
39 if (require.register)
40 require.register('ion/runtime/BlockStatement',_ion_runtime_BlockStatement_);
41 else
42 _ion_runtime_BlockStatement_.call(this, module, exports, require);
43 }
44 else {
45 _ion_runtime_BlockStatement_.call(this);
46 }
47}).call(this)
48//# sourceMappingURL=./BlockStatement.map
\No newline at end of file