Happy Birthday, CoffeeScript-in-CoffeeScript, you just passed the entire test suite.

This commit is contained in:
Jeremy Ashkenas
2010-02-12 22:24:57 -05:00
parent e2f3c2259b
commit 1552470413
2 changed files with 5 additions and 16 deletions

View File

@@ -62,10 +62,10 @@ exports.compile_scripts: ->
return unless source: @sources.shift()
opts: @options
posix.cat(source).addCallback (code) ->
return puts coffee.tokenize(code).join(' ') if opts.tokens
return puts coffee.tree(code).toString() if opts.tree
return eval coffee.compile code if opts.run
return puts coffee.compile code if opts.print
if opts.tokens then puts coffee.tokenize(code).join(' ')
else if opts.tree then puts coffee.tree(code).toString()
else if opts.run then eval coffee.compile code
else if opts.print then puts coffee.compile code
exports.compile_scripts()