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

@@ -212,6 +212,8 @@
return new ValueNode($1);
}), o("Range", function() {
return new ValueNode($1);
}), o("This", function() {
return new ValueNode($1);
}), o("Value Accessor", function() {
return $1.push($2);
}), o("Invocation Accessor", function() {
@@ -285,6 +287,13 @@
return new CallNode('super', $3);
})
],
// This references, either naked or to a property.
This: [o("@", function() {
return new ThisNode();
}), o("@ IDENTIFIER", function() {
return new ThisNode(yytext);
})
],
// The range literal.
Range: [o("[ Expression . . Expression ]", function() {
return new RangeNode($2, $5);