mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 19:11:22 -05:00
The moment of truth: CoffeeScript has now compiled itself ten times over.
This commit is contained in:
@@ -32,8 +32,7 @@
|
||||
IMPLICIT_END = ['IF', 'UNLESS', 'FOR', 'WHILE', 'TERMINATOR', 'OUTDENT'];
|
||||
IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'TRY', 'DELETE', 'TYPEOF', 'SWITCH', 'TRUE', 'FALSE', 'YES', 'NO', 'ON', 'OFF', '!', '!!', 'NOT', '@', '->', '=>', '[', '(', '{'];
|
||||
// The inverse mappings of token pairs we're trying to fix up.
|
||||
INVERSES = {
|
||||
};
|
||||
INVERSES = {};
|
||||
__g = BALANCED_PAIRS;
|
||||
for (__h = 0; __h < __g.length; __h++) {
|
||||
pair = __g[__h];
|
||||
@@ -266,8 +265,7 @@
|
||||
// the course of the token stream.
|
||||
re.prototype.ensure_balance = function ensure_balance(pairs) {
|
||||
var __i, __j, key, levels, unclosed, value;
|
||||
levels = {
|
||||
};
|
||||
levels = {};
|
||||
this.scan_tokens((function(__this) {
|
||||
var __func = function(prev, token, post, i) {
|
||||
var __i, __j, __k, close, open;
|
||||
@@ -322,11 +320,11 @@
|
||||
// it with the inverse of what we've just popped.
|
||||
// 3. Keep track of "debt" for tokens that we fake, to make sure we end
|
||||
// up balanced in the end.
|
||||
//
|
||||
re.prototype.rewrite_closing_parens = function rewrite_closing_parens() {
|
||||
var __i, debt, key, stack, val;
|
||||
stack = [];
|
||||
debt = {
|
||||
};
|
||||
debt = {};
|
||||
__i = INVERSES;
|
||||
for (key in __i) {
|
||||
val = __i[key];
|
||||
|
||||
Reference in New Issue
Block a user