mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 19:11:22 -05:00
implementing grayrest's suggested cleanup for object comprehensions
This commit is contained in:
@@ -522,26 +522,24 @@
|
||||
bnf = {};
|
||||
tokens = [];
|
||||
__a = grammar;
|
||||
for (name in __a) {
|
||||
for (name in __a) if (__hasProp.call(__a, name)) {
|
||||
non_terminal = __a[name];
|
||||
if (__hasProp.call(__a, name)) {
|
||||
bnf[name] = (function() {
|
||||
__b = []; __c = non_terminal;
|
||||
for (__d = 0; __d < __c.length; __d++) {
|
||||
option = __c[__d];
|
||||
__b.push((function() {
|
||||
__e = option[0].split(" ");
|
||||
for (__f = 0; __f < __e.length; __f++) {
|
||||
part = __e[__f];
|
||||
!grammar[part] ? tokens.push(part) : null;
|
||||
}
|
||||
name === "Root" ? (option[1] = "return " + option[1]) : null;
|
||||
return option;
|
||||
}).call(this));
|
||||
}
|
||||
return __b;
|
||||
}).call(this);
|
||||
}
|
||||
bnf[name] = (function() {
|
||||
__b = []; __c = non_terminal;
|
||||
for (__d = 0; __d < __c.length; __d++) {
|
||||
option = __c[__d];
|
||||
__b.push((function() {
|
||||
__e = option[0].split(" ");
|
||||
for (__f = 0; __f < __e.length; __f++) {
|
||||
part = __e[__f];
|
||||
!grammar[part] ? tokens.push(part) : null;
|
||||
}
|
||||
name === "Root" ? (option[1] = "return " + option[1]) : null;
|
||||
return option;
|
||||
}).call(this));
|
||||
}
|
||||
return __b;
|
||||
}).call(this);
|
||||
}
|
||||
tokens = tokens.join(" ");
|
||||
parser = new Parser({
|
||||
|
||||
Reference in New Issue
Block a user