mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 19:11:22 -05:00
CoffeeScript-in-CoffeeScript can compile dotted accessors
This commit is contained in:
@@ -107,12 +107,12 @@
|
||||
if (tag === 'IDENTIFIER' && this.value() === '::') {
|
||||
this.tag(-1, 'PROTOTYPE_ACCESS');
|
||||
}
|
||||
if (tag === 'IDENTIFIER' && this.value() === '.' && !(this.value(-2) === '.')) {
|
||||
if (this.tag(-2) === '?') {
|
||||
this.tag(-1, 'SOAK_ACCESS');
|
||||
if (tag === 'IDENTIFIER' && this.value() === '.' && !(this.value(2) === '.')) {
|
||||
if (this.tag(2) === '?') {
|
||||
this.tag(1, 'SOAK_ACCESS');
|
||||
this.tokens.splice(-2, 1);
|
||||
} else {
|
||||
this.tag(-1, 'PROPERTY_ACCESS');
|
||||
this.tag(1, 'PROPERTY_ACCESS');
|
||||
}
|
||||
}
|
||||
this.token(tag, id);
|
||||
|
||||
Reference in New Issue
Block a user