summaryrefslogtreecommitdiff
path: root/js/lib
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-01-09 12:49:07 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-01-09 12:49:07 -0800
commit0fa08a7f89aa199b9cbd7214cdfd890d209e2214 (patch)
tree74b026fed4e0e2b2afa9964170e46893707e0b70 /js/lib
parent1446dc2c02a73abeeafbb431fea2cabda444a1cb (diff)
Initialize more fields in Node.
This helps with performance.
Diffstat (limited to 'js/lib')
-rw-r--r--js/lib/node.js7
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];