   run = (classes) ->
     TransformerBase.run(ast, options, classes, ctx)
 
+  comments = not (options.comments is false)
+
   # Injects comments into the AST as BlockComment and LineComment nodes.
-  unless options.comments is false
-    run [ require('./lib/transforms/comments') ]
+  run [
+    require('./lib/transforms/comments')
+  ] if comments
 
   # Moves named functions to the top of the scope.
-  run [ require('./lib/transforms/functions') ]
+  run [
+    require('./lib/transforms/functions')
+  ]
 
   # Everything else -- these can be done in one step without any side effects.
   run [

# ~ filename (String): the filename, used in source maps and errors.
# ~ comments (Boolean): set to `false` to disable comments.
#
# How it works:
#
# 1. It uses Esprima to convert the input into a JavaScript AST.
# 2. It uses AST transformations (see [js2coffee.transform]) to mutate the AST
#    into a CoffeeScript AST.
# 3. It generates cofe (see [js2coffee.generate]) to compile the CoffeeScript
#    AST into CoffeeScript code.
###

js2coffee.build = (source, options = {}) ->

#
#     ast = js2coffee.parseJS('var a = 2;')
#     result = js2coffee.transform(ast)
#
#     result.ast
#     result.warnings
#
# This performs a few traversals across the tree using traversal classes
# (TransformerBase subclasses).
