From dbcb9df22b4d5a0d1c26e689c0b0d119a05f3282 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Fri, 12 Feb 2010 13:56:58 -0500 Subject: [PATCH] correctly self-compiling @references --- lib/coffee_script/nodes.js | 2 +- src/nodes.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/coffee_script/nodes.js b/lib/coffee_script/nodes.js index 401de91d..5b037fb6 100644 --- a/lib/coffee_script/nodes.js +++ b/lib/coffee_script/nodes.js @@ -568,7 +568,7 @@ return this; }, compile_node: function compile_node(o) { - return 'this' + (this.property ? '.' + this.property : ''); + return 'this' + (this.property ? '.' + this.property.compile(o) : ''); } })); // A range literal. Ranges can be used to extract portions (slices) of arrays, diff --git a/src/nodes.coffee b/src/nodes.coffee index 82424be7..c97fdaa6 100644 --- a/src/nodes.coffee +++ b/src/nodes.coffee @@ -434,7 +434,7 @@ ThisNode: exports.ThisNode: inherit Node, { this compile_node: (o) -> - 'this' + (if @property then '.' + @property else '') + 'this' + (if @property then '.' + @property.compile(o) else '') }