anchor.diff:  Directory tmpDir;
   
   main(List<String> args) async {
  +  await loadExternalCompilers();
  +
     var argp = new ArgParser();
  -  argp.addFlag("test", negatable: false, abbr: "t", help: "Runs the script in a testing environment.");
  -
  -  argp.addOption("compile", abbr: "c", allowed: [
  -    "tiny-ast",
  -    "ast",
  -    "js",
  -    "badger",
  -    "snapshot",
  -    "dart"
  -  ], help: "Compiles Badger Code");
  -
  -  argp.addOption("compiler-opt", abbr: "O", help: "Specifies a Compiler Option", allowMultiple: true);
  -
  +  argp.addFlag("test",
  +      negatable: false,
  +      abbr: "t",
  +      help: "Runs the script in a testing environment.");
  +
  +  argp.addOption("compile",
  +      abbr: "c",
  +      allowed: ["tiny-ast", "ast", "js", "badger", "snapshot", "dart"]..addAll(externalCompilers.map((it) => it.name).toList()),
  +      help: "Compiles Badger Code");
  +
  +  argp.addOption("compiler-opt",
  +      abbr: "O", help: "Specifies a Compiler Option", allowMultiple: true);
   
     var opts = argp.parse(args);
   
  
positive.code:   var env = new FileEnvironment(file);
  
    if (opts["compile"] != null) {
      var name = opts["compile"];
      CompilerTarget target;
  
      if (name == "ast") {
        target = new AstCompilerTarget();
      } else if (name == "js") {
        target = new JsCompilerTarget();
      } else if (name == "badger") {
        target = new BadgerCompilerTarget();
      } else if (name == "tiny-ast") {
        target = new TinyAstCompilerTarget();
      } else if (name == "snapshot") {
        target = new SnapshotCompilerTarget(env);
      } else if (name == "dart") {
        target = new DartCompilerTarget();
      } else {
        print("Unknown Compiler Target: ${name}");
        exit(1);
      }
  
      var o = opts["compiler-opt"];
      var optz = {};
  
      for (var i in o) {
        var split = i.split("=");
  
        if (split.length == 1) {
          optz[split[0]] = true;
        } else {
          var key = split[0];
          var value = split.skip(1).join("=");
  
          if (value == "true" || value == "false") {
            optz[key] = value == "true";
            continue;
          }
  
          try {
            value = num.parse(value);
  
            optz[key] = value;
          } catch (e) {
          }
  
          optz[key] = value;
        }
      }
  
      target.options = optz;
  
      target.options.putIfAbsent("isTestSuite", () => opts["test"]);
  
      var program = await env.parse();
      print(await target.compile(program));
      exit(0);
    }
  
    await env.eval(context);
  
negative.code:     await tmpDir.delete(recursive: true);
    }
  }
  
  loadExternalCompilers() async {
    var dir = new Directory(
        "${Platform.environment["HOME"]}${Platform.pathSeparator}.badger");
    var compilersDir = new Directory("${dir.path}/compilers");
  
    if (!(await compilersDir.exists())) {
      return;
    }
  
    await for (var file in compilersDir
        .list(recursive: true)
        .where((it) => it.path.endsWith(".json"))) {
      var name = file.path.split(Platform.pathSeparator).last;
      name = name.substring(0, name.lastIndexOf(".json"));
      var config = JSON.decode(await file.readAsString());
  
      if (config is! Map) {
        print(
            "ERROR: External compiler '${name}' provided an invalid configuration. Configuration should be a map.");
        exit(1);
      } else if (!config.containsKey("command")) {
        print(
            "ERROR: External compiler '${name}' provided an invalid configuration. Configuration should provide a command.");
        exit(1);
      } else if (config.containsKey("ast") && config["ast"] is! bool) {
        print(
            "ERROR: External compiler '${name}' provided an invalid configuration. Configuration entry 'ast' should be a boolean.");
        exit(1);
      }
  
      var c = new ExternalCompiler();
      c.name = name;
      c.command = config["command"];
      c.provideAst = config.containsKey("ast") ? config["ast"] : false;
  
      externalCompilers.add(c);
    }
  }
  
  List<ExternalCompiler> externalCompilers = [];
  
  class ExternalCompiler {
    String name;
    String command;
    bool provideAst;
  }
  