Files
sdk/pkg/dev_compiler/lib/runtime/run.js
T
Sigmund Cherem 02a4650a24 Refactor: move code around a bit
- bin/
    devc.dart

- lib/
    devc.dart

    src/
       info.dart # static info we compute, used by checker & backends
       checker/  # implementation details for the checker
          checker.dart  # checking algorithm
          rules.dart    # type checking rules
          resolver.dart # same as today, type resolution via analyzer
       emitter/
          ...
- test/
     checker/    # unit tests for the checker internals
     codegen/    # left as is - maybe should rename to emitter?
     samples/    # stand alone samples that we run in the end_to_end tests.
     ...

R=vsm@google.com

Review URL: https://chromereviews.googleplex.com/128957013
2014-12-11 15:13:54 -08:00

21 lines
398 B
JavaScript

var fs = require('fs');
var vm = require('vm');
function __load(path) {
var data = fs.readFileSync(path);
var script = vm.createScript(data.toString(), path);
script.runInThisContext();
}
var args = process.argv.slice(2);
var argc = args.length;
for(var i = 0; i < argc-1; ++i) {
__load(args[i]);
}
var main = vm.createScript(args[argc-1]+'.main()', 'main');
main.runInThisContext();