mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
first attempt at including 'yield*'
This commit is contained in:
@@ -803,7 +803,7 @@
|
||||
|
||||
})();
|
||||
|
||||
JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'yield', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super'];
|
||||
JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'yield', 'yield*', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super'];
|
||||
|
||||
COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when'];
|
||||
|
||||
@@ -880,7 +880,7 @@
|
||||
|
||||
COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|='];
|
||||
|
||||
UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO', 'YIELD'];
|
||||
UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO', 'YIELD', 'YIELD*'];
|
||||
|
||||
LOGIC = ['&&', '||', '&', '|', '^'];
|
||||
|
||||
|
||||
@@ -2378,7 +2378,7 @@
|
||||
return (new Parens(this)).compileToFragments(o);
|
||||
}
|
||||
plusMinus = op === '+' || op === '-';
|
||||
if ((op === 'new' || op === 'typeof' || op === 'delete' || op === 'yield') || plusMinus && this.first instanceof Op && this.first.operator === op) {
|
||||
if ((op === 'new' || op === 'typeof' || op === 'delete' || op === 'yield' || op === 'yield*') || plusMinus && this.first instanceof Op && this.first.operator === op) {
|
||||
parts.push([this.makeCode(' ')]);
|
||||
}
|
||||
if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) {
|
||||
|
||||
Reference in New Issue
Block a user