more progress with the lexer, perhaps it's done

This commit is contained in:
Jeremy Ashkenas
2010-01-30 15:56:40 -05:00
parent f19360c6b9
commit babeebcc1a
6 changed files with 247 additions and 121 deletions

View File

@@ -23,7 +23,11 @@ exports.compile_files: (paths, callback) ->
coffee: process.createChildProcess compiler, ['--print'].concat(paths)
coffee.addListener 'output', (results) ->
js += results if results?
# NB: we have to add a mutex to make sure it doesn't get called twice.
exit_ran: false
coffee.addListener 'exit', ->
return if exit_ran
exit_ran: true
callback(js)