Skip to content

Commit 21b2910

Browse files
committed
fixes - try to pass tests
1 parent c405af1 commit 21b2910

3 files changed

Lines changed: 119 additions & 189 deletions

File tree

src/nodes/block.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,7 @@ var comment = require('../utils/comment');
2323
* @property {trait[]} traits {@link TRAIT.md|:link:} List of defined traits
2424
* @property {block[]} blocks {@link BLOCK.md|:link:} List of variable scoped blocks
2525
*/
26-
var block = node.extends(function block(parent, ast) {
27-
this.variables = [];
28-
this.defines = [];
29-
this.functions = [];
30-
this.classes = [];
31-
this.interfaces = [];
32-
this.traits = [];
33-
this.blocks = [];
34-
node.apply(this, arguments);
35-
});
26+
var block = node.extends('block');
3627

3728
/**
3829
* @protected Gets the current block
@@ -44,8 +35,10 @@ block.prototype.getBlock = function() {
4435
/**
4536
* @protected Consumes the current ast node
4637
*/
47-
block.prototype.consume = function(ast) {
48-
this.scanForChilds(ast);
38+
block.prototype.consume = function(file, parent, ast) {
39+
// super constructor
40+
node.prototype.consume.apply(this, [file, parent, ast]);
41+
this.scanForChilds(ast);
4942
};
5043

5144
/**

0 commit comments

Comments
 (0)