mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
* support postfix conditional on first line of implicit object * cleanup cleanup * also fixes #2051, added test
This commit is contained in:
parent
d756bd6851
commit
63b109a4f5
5 changed files with 115 additions and 58 deletions
|
@ -657,14 +657,15 @@
|
|||
}
|
||||
|
||||
tagParameters() {
|
||||
var i, stack, tok, tokens;
|
||||
var i, paramEndToken, stack, tok, tokens;
|
||||
if (this.tag() !== ')') {
|
||||
return this;
|
||||
}
|
||||
stack = [];
|
||||
({tokens} = this);
|
||||
i = tokens.length;
|
||||
tokens[--i][0] = 'PARAM_END';
|
||||
paramEndToken = tokens[--i];
|
||||
paramEndToken[0] = 'PARAM_END';
|
||||
while (tok = tokens[--i]) {
|
||||
switch (tok[0]) {
|
||||
case ')':
|
||||
|
@ -678,6 +679,7 @@
|
|||
tok[0] = 'PARAM_START';
|
||||
return this;
|
||||
} else {
|
||||
paramEndToken[0] = 'CALL_END';
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue