All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.MainForLanguage Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package main;
import com.redhat.ceylon.cmr.api.RepositoryManager;
import com.redhat.ceylon.cmr.ceylon.CeylonUtils;
import com.redhat.ceylon.compiler.typechecker.TypeCheckerBuilder;
import com.redhat.ceylon.compiler.typechecker.io.ClosableVirtualFile;
import com.redhat.ceylon.compiler.typechecker.io.cmr.impl.LeakingLogger;

/**
 * Some hack before a proper unit test harness is put in place
 *
 * @author Emmanuel Bernard 
 */
public class MainForLanguage {
    /**
     * Files that are not under a proper module structure are 
     * placed under a  module.
     */
    public static void main(String[] args) throws Exception {
        ClosableVirtualFile latestZippedLanguageSourceFile = 
                MainHelper.getLatestZippedLanguageSourceFile();
        RepositoryManager repositoryManager = CeylonUtils.repoManager()
                .systemRepo("../dist/dist/repo")
                .logger(new LeakingLogger())
                .buildManager();
        new TypeCheckerBuilder()
                .verbose(false)
                .addSrcDirectory(latestZippedLanguageSourceFile)
                .setRepositoryManager(repositoryManager)
                .getTypeChecker()
                .process();
        latestZippedLanguageSourceFile.close();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy