Skip to content

Instantly share code, notes, and snippets.

View quintesse's full-sized avatar

Tako Schotanus quintesse

  • RedHat
  • Alicante, Spain
  • 11:10 (UTC +02:00)
View GitHub Profile
@quintesse
quintesse / module.ceylon
Last active August 29, 2015 14:07
A test script for the Ceylon web runner: http://try.ceylon-lang.org/
module web_ide_script "1.0.0" {
}
TypeCheckerBuilder tcb = new TypeCheckerBuilder();
for (File path: this.sourceFolders) {
tcb.addSrcDirectory(applyCwd(path));
}
TypeChecker tc = tcb.getTypeChecker();
PhasedUnits pus = tc.getPhasedUnits();
pus.visitModules();
final Options opts = new Options().addRepo("build/runtime").outRepo("build/test/proto");
final RepositoryManager repoman = CeylonUtils.repoManager()
.cwd(opts.getCwd())
.systemRepo(opts.getSystemRepo())
.userRepos(opts.getRepos())
.outRepo(opts.getOutRepo())
.buildManager();
JsModuleManagerFactory.setVerbose(true);
TypeCheckerBuilder tcb = new TypeCheckerBuilder().verbose(false)
.moduleManagerFactory(new JsModuleManagerFactory(null))
//$webrun_full_script
import ceylon.language.meta.declaration {
ValueDeclaration
}
shared void run() {
for (dec in `class String`.memberDeclarations<ValueDeclaration>()) {
print(dec);
}
}