Implementing sethaurus' suggestion for better temp variable names -- getting rid of the numbers.

This commit is contained in:
Jeremy Ashkenas
2010-02-16 18:00:40 -05:00
parent e4bb6c91e7
commit db6bc0ba02
8 changed files with 256 additions and 256 deletions

View File

@@ -1,5 +1,5 @@
(function(){
var Parser, _1, _2, _3, _4, _5, _6, bnf, grammar, name, non_terminal, o, operators, option, part, tokens, unwrap;
var Parser, _a, _b, _c, _d, _e, _f, bnf, grammar, name, non_terminal, o, operators, option, part, tokens, unwrap;
var __hasProp = Object.prototype.hasOwnProperty;
Parser = require('jison').Parser;
// DSL ===================================================================
@@ -523,24 +523,24 @@
// Make the Jison parser.
bnf = {};
tokens = [];
_1 = grammar;
for (name in _1) if (__hasProp.call(_1, name)) {
non_terminal = _1[name];
_a = grammar;
for (name in _a) if (__hasProp.call(_a, name)) {
non_terminal = _a[name];
bnf[name] = (function() {
_2 = []; _3 = non_terminal;
for (_4 = 0; _4 < _3.length; _4++) {
option = _3[_4];
_2.push((function() {
_5 = option[0].split(" ");
for (_6 = 0; _6 < _5.length; _6++) {
part = _5[_6];
_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 _2;
return _b;
}).call(this);
}
tokens = tokens.join(" ");