added the ability to print the parse tree

This commit is contained in:
Jeremy Ashkenas
2010-02-11 23:11:05 -05:00
parent 950d1199c2
commit 7c01bba4f4
6 changed files with 92 additions and 10 deletions

View File

@@ -33,6 +33,10 @@
exports.tokenize = function tokenize(code) {
return lexer.tokenize(code);
};
// Just the nodes.
exports.tree = function tree(code) {
return parser.parse(lexer.tokenize(code));
};
//---------- Below this line is obsolete, for the Ruby compiler. ----------------
// Executes the `coffee` Ruby program to convert from CoffeeScript to JavaScript.
path = require('path');