diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 12:49:07 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 12:49:07 -0800 |
commit | 0fa08a7f89aa199b9cbd7214cdfd890d209e2214 (patch) | |
tree | 74b026fed4e0e2b2afa9964170e46893707e0b70 /js/lib/node.js | |
parent | 1446dc2c02a73abeeafbb431fea2cabda444a1cb (diff) |
Initialize more fields in Node.
This helps with performance.
Diffstat (limited to 'js/lib/node.js')
-rw-r--r-- | js/lib/node.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/js/lib/node.js b/js/lib/node.js index befa93f..7e236d0 100644 --- a/js/lib/node.js +++ b/js/lib/node.js @@ -72,6 +72,10 @@ function Node(nodeType, pos) { this.open = true; this.strings = []; this.string_content = ""; + this.c = undefined; + this.list_data = undefined; + this.tight = undefined; + this.info = undefined; } Node.prototype.isContainer = function() { @@ -159,8 +163,7 @@ Node.prototype.toAST = function() { var result = { t: this.t }; var propsToShow = ['t', 'c', 'list_data', 'string_content', - 'pos', 'start_column', 'end_column', - 'tight', 'info']; + 'pos', 'tight', 'info']; for (var i = 0; i < propsToShow.length; i++) { var prop = propsToShow[i]; |