1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

merging gfxmonk's cleanups

This commit is contained in:
Jeremy Ashkenas 2010-03-21 10:11:02 -04:00
commit 4ec79732f1
12 changed files with 494 additions and 174 deletions

View file

@ -37,7 +37,9 @@
err.message = "In " + (options.source) + ", " + (err.message);
}
throw err;
return null;
}
return null;
});
// Tokenize a string of CoffeeScript code, and return the array of tokens.
exports.tokens = function tokens(code) {
@ -78,7 +80,8 @@
},
setInput: function setInput(tokens) {
this.tokens = tokens;
return this.pos = 0;
this.pos = 0;
return this.pos;
},
upcomingInput: function upcomingInput() {
return "";
@ -97,11 +100,10 @@
_a = []; _b = document.getElementsByTagName('script');
for (_c = 0, _d = _b.length; _c < _d; _c++) {
tag = _b[_c];
if (tag.type === 'text/coffeescript') {
_a.push(eval(exports.compile(tag.innerHTML)));
}
tag.type === 'text/coffeescript' ? _a.push(eval(exports.compile(tag.innerHTML))) : null;
}
return _a;
return null;
};
if (window.addEventListener) {
window.addEventListener('load', process_scripts, false);