docs: function compile(cmd, url) {
    var err = false;
    var reporter = {
      reportError: function(pos, msg) {
        err = true;
  
        var errMsg = util.format('%s:%s:%s %s', url, pos.line, pos.offset, msg);
  
        debug2('traceur-report-error: %s', errMsg);
        throw new Error(errMsg);
      },
      hadError: function() {
        return err;
      }
    };
  
    var project, src, parser, tree, transformedTree, written;
  
    try {
      debug('traceur-input: %s', cmd);
  
      project = new Project(url);
      src = new SourceFile(url, cmd);
      project.addFile(src);
  
      parser = new Parser(reporter, src);
      tree = parser.parseProgram(true);
      debugTree('traceur-input-tree:\n%s', tree);
      project.setParseTree(src, tree);
  
      transformedTree = transformFile(reporter, project, src).get(src);
      debugTree('traceur-output-tree:\n%s', transformedTree);
  
      written = TreeWriter.write(transformedTree);
      debug('traceur-output: %s', written);
      return written;
    } catch(e) {
      debug3('traceur-compile-exception: %s', e.stack || e);
  
      if (parser && parser.isAtEnd())
        throw new SyntaxError('skip incomplete input');
  
      if (isWrapped(cmd))
        throw new SyntaxError('skip wrap');
  
      throw e;
    }
  }