mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Cleaned up return logic
- ReturnNodes are explicitly added during compilation - ReturnNode is used instead of scattering "return" throughout code compilation snippets - nodes gain a make_return method in order to do the most useful thing when a return is requested
This commit is contained in:
parent
8553a89af2
commit
cc3c314988
11 changed files with 458 additions and 145 deletions
|
@ -63,6 +63,7 @@
|
|||
_d.push(' ');
|
||||
}
|
||||
return _d;
|
||||
return null;
|
||||
}).call(this).join('') : '';
|
||||
let_part = rule.short_flag ? rule.short_flag + ', ' : ' ';
|
||||
lines.push(" " + let_part + (rule.long_flag) + spaces + (rule.description));
|
||||
|
@ -70,6 +71,7 @@
|
|||
return "\n" + (lines.join('\n')) + "\n";
|
||||
};
|
||||
return OptionParser;
|
||||
return null;
|
||||
}).call(this);
|
||||
// Helpers
|
||||
// -------
|
||||
|
@ -93,6 +95,7 @@
|
|||
}).call(this));
|
||||
}
|
||||
return _a;
|
||||
return null;
|
||||
};
|
||||
// Build a rule from a `-o` short flag, a `--output [DIR]` long flag, and the
|
||||
// description of what the option does.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue