diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-15 14:17:27 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-15 14:17:27 -0800 |
commit | 604c15c301a634a7c237e2336296d2d86d771fcf (patch) | |
tree | 4eb045fcf90d614c15290247f66656c49afe81a4 /js/lib/node.js | |
parent | 8e51ff90c5d6fb2b8c4cec54a77cfd45f7eb8e8f (diff) |
Rename sourcepos -> _sourcepos, added sourcepos() accessor.
Diffstat (limited to 'js/lib/node.js')
-rw-r--r-- | js/lib/node.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/lib/node.js b/js/lib/node.js index 8e424a2..3041f15 100644 --- a/js/lib/node.js +++ b/js/lib/node.js @@ -69,7 +69,7 @@ var Node = function(nodeType, sourcepos) { this.lastChild = null; this.prev = null; this.next = null; - this.sourcepos = sourcepos; + this._sourcepos = sourcepos; this.last_line_blank = false; this.open = true; this.strings = null; @@ -93,6 +93,10 @@ Node.prototype.type = function() { return this._type; }; +Node.prototype.sourcepos = function() { + return this._sourcepos; +}; + Node.prototype.appendChild = function(child) { child.unlink(); child.parent = this; |