CoffeeScript-in-CoffeeScript can compile @property references.

This commit is contained in:
Jeremy Ashkenas
2010-02-08 23:51:34 -05:00
parent 863de88671
commit 522df2a355
4 changed files with 38 additions and 1 deletions

View File

@@ -473,6 +473,18 @@ IndexNode: exports.IndexNode: inherit Node, {
}
# A this-reference, using '@'.
ThisNode: exports.ThisNode: inherit Node, {
constructor: (property) ->
@property: property or null
compile_node: (o) ->
'this' + (if @property then '.' + @property else '')
}