mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-14 17:27:59 -05:00
grammar: removed extra arrays
This commit is contained in:
@@ -130,7 +130,7 @@
|
||||
}), o("Param", function() {
|
||||
return [$1];
|
||||
}), o("ParamList , Param", function() {
|
||||
return $1.concat([$3]);
|
||||
return $1.concat($3);
|
||||
})
|
||||
],
|
||||
Param: [
|
||||
@@ -209,9 +209,9 @@
|
||||
}), o("AssignObj", function() {
|
||||
return [$1];
|
||||
}), o("AssignList , AssignObj", function() {
|
||||
return $1.concat([$3]);
|
||||
return $1.concat($3);
|
||||
}), o("AssignList OptComma TERMINATOR AssignObj", function() {
|
||||
return $1.concat([$4]);
|
||||
return $1.concat($4);
|
||||
}), o("AssignList OptComma INDENT AssignList OptComma OUTDENT", function() {
|
||||
return $1.concat($4);
|
||||
})
|
||||
@@ -329,9 +329,9 @@
|
||||
o("Arg", function() {
|
||||
return [$1];
|
||||
}), o("ArgList , Arg", function() {
|
||||
return $1.concat([$3]);
|
||||
return $1.concat($3);
|
||||
}), o("ArgList OptComma TERMINATOR Arg", function() {
|
||||
return $1.concat([$4]);
|
||||
return $1.concat($4);
|
||||
}), o("INDENT ArgList OptComma OUTDENT", function() {
|
||||
return $2;
|
||||
}), o("ArgList OptComma INDENT ArgList OptComma OUTDENT", function() {
|
||||
@@ -341,7 +341,7 @@
|
||||
Arg: [o("Expression"), o("Splat")],
|
||||
SimpleArgs: [
|
||||
o("Expression"), o("SimpleArgs , Expression", function() {
|
||||
return $1 instanceof Array ? $1.concat([$3]) : [$1].concat([$3]);
|
||||
return [].concat($1, $3);
|
||||
})
|
||||
],
|
||||
Try: [
|
||||
|
||||
@@ -133,7 +133,7 @@ case 61:this.$ = [];
|
||||
break;
|
||||
case 62:this.$ = [$$[$0-1+1-1]];
|
||||
break;
|
||||
case 63:this.$ = $$[$0-3+1-1].concat([$$[$0-3+3-1]]);
|
||||
case 63:this.$ = $$[$0-3+1-1].concat($$[$0-3+3-1]);
|
||||
break;
|
||||
case 64:this.$ = new yy.Literal($$[$0-1+1-1]);
|
||||
break;
|
||||
@@ -199,9 +199,9 @@ case 91:this.$ = [];
|
||||
break;
|
||||
case 92:this.$ = [$$[$0-1+1-1]];
|
||||
break;
|
||||
case 93:this.$ = $$[$0-3+1-1].concat([$$[$0-3+3-1]]);
|
||||
case 93:this.$ = $$[$0-3+1-1].concat($$[$0-3+3-1]);
|
||||
break;
|
||||
case 94:this.$ = $$[$0-4+1-1].concat([$$[$0-4+4-1]]);
|
||||
case 94:this.$ = $$[$0-4+1-1].concat($$[$0-4+4-1]);
|
||||
break;
|
||||
case 95:this.$ = $$[$0-6+1-1].concat($$[$0-6+4-1]);
|
||||
break;
|
||||
@@ -277,9 +277,9 @@ case 130:this.$ = new yy.ArrayLiteral($$[$0-4+2-1]);
|
||||
break;
|
||||
case 131:this.$ = [$$[$0-1+1-1]];
|
||||
break;
|
||||
case 132:this.$ = $$[$0-3+1-1].concat([$$[$0-3+3-1]]);
|
||||
case 132:this.$ = $$[$0-3+1-1].concat($$[$0-3+3-1]);
|
||||
break;
|
||||
case 133:this.$ = $$[$0-4+1-1].concat([$$[$0-4+4-1]]);
|
||||
case 133:this.$ = $$[$0-4+1-1].concat($$[$0-4+4-1]);
|
||||
break;
|
||||
case 134:this.$ = $$[$0-4+2-1];
|
||||
break;
|
||||
@@ -291,7 +291,7 @@ case 137:this.$ = $$[$0-1+1-1];
|
||||
break;
|
||||
case 138:this.$ = $$[$0-1+1-1];
|
||||
break;
|
||||
case 139:this.$ = $$[$0-3+1-1] instanceof Array ? $$[$0-3+1-1].concat([$$[$0-3+3-1]]) : [$$[$0-3+1-1]].concat([$$[$0-3+3-1]]);
|
||||
case 139:this.$ = [].concat($$[$0-3+1-1], $$[$0-3+3-1]);
|
||||
break;
|
||||
case 140:this.$ = new yy.Try($$[$0-2+2-1]);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user