anchor.diff:    _readOptions(options);
   
     if (options.rest.isEmpty) {
  -    _formatStdin(options);
  +    _formatStdin(kind);
     } else {
       _formatPaths(options.rest);
     }
   }
   
   _readOptions(options) {
  +  kind = _parseKind(options['kind']);
     machineFormat = options['machine'];
     overwriteFileContents = options['write'];
     selection = _parseSelection(options['selection']);
     formatterSettings =
         new FormatterOptions(codeTransforms: options['transform']);
  +}
  +
  +CodeKind _parseKind(kindOption) {
  +  switch(kindOption) {
  +    case 'stmt' :
  +      return CodeKind.STATEMENT;
  +    default:
  +      return CodeKind.COMPILATION_UNIT;
  +  }
   }
   
   Selection _parseSelection(selectionOption) {
  
positive.code:   _log(buffer.toString());
  }
  
  /// Format the given [src] as a compilation unit.
  String _formatCU(src) {
    var formatResult = new CodeFormatter(formatterSettings).format(
        CodeKind.COMPILATION_UNIT, src, selection: selection);
    if (machineFormat) {
      if (formatResult.selection == null) {
        formatResult.selection = defaultSelection;
  
negative.code: 
  var formatterSettings;
  
  CodeKind kind;
  bool machineFormat;
  bool overwriteFileContents;
  Selection selection;
  