done for now

This commit is contained in:
Jeremy Ashkenas
2010-02-11 02:39:57 -05:00
parent 872b36c11d
commit 713f6f32e1
7 changed files with 59 additions and 96 deletions

View File

@@ -27,10 +27,11 @@
exports.VERSION = '0.5.0';
// Compile CoffeeScript to JavaScript, using the Coffee/Jison compiler.
exports.compile = function compile(code) {
var nodes, tokens;
tokens = lexer.tokenize(code);
nodes = parser.parse(tokens);
return nodes.compile();
return (parser.parse(lexer.tokenize(code))).compile();
};
// Just the tokens.
exports.tokenize = function tokenize(code) {
return lexer.tokenize(code);
};
//---------- Below this line is obsolete, for the Ruby compiler. ----------------
// Executes the `coffee` Ruby program to convert from CoffeeScript to JavaScript.