From 604c15c301a634a7c237e2336296d2d86d771fcf Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 15 Jan 2015 14:17:27 -0800 Subject: Rename sourcepos -> _sourcepos, added sourcepos() accessor. --- js/lib/node.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js/lib/node.js') 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; -- cgit v1.2.3