diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 12:45:37 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 12:45:37 -0800 |
commit | 1446dc2c02a73abeeafbb431fea2cabda444a1cb (patch) | |
tree | 2ddca31c61bcc506153b0bf8599a35d53c6e8d10 /js/lib/node.js | |
parent | 4b52529eb964fd1e949ae60e2da70ac3a0db6a9c (diff) |
Removed makeBlock. Use new Node directly. Initialize more fields.
Diffstat (limited to 'js/lib/node.js')
-rw-r--r-- | js/lib/node.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/lib/node.js b/js/lib/node.js index f88dff5..befa93f 100644 --- a/js/lib/node.js +++ b/js/lib/node.js @@ -60,14 +60,18 @@ NodeWalker.prototype.next = function(){ return {entering: entering, node: cur}; }; -function Node(nodeType) { +function Node(nodeType, pos) { this.t = nodeType; this.parent = null; this.firstChild = null; this.lastChild = null; this.prev = null; this.next = null; - this.pos = {}; + this.pos = pos || {}; + this.last_line_blank = false; + this.open = true; + this.strings = []; + this.string_content = ""; } Node.prototype.isContainer = function() { |