Package com.redhat.ceylon.compiler.typechecker.parser

Examples of com.redhat.ceylon.compiler.typechecker.parser.CeylonParser.compilationUnit()


            //System.out.println("Parsing " + file.getName());
            CeylonLexer lexer = new CeylonLexer(new ANTLRInputStream(file.getInputStream(), getEncoding()));
            CommonTokenStream tokenStream = new CommonTokenStream(lexer);
            CeylonParser parser = new CeylonParser(tokenStream);
            Tree.CompilationUnit cu = parser.compilationUnit();
            List<CommonToken> tokens = new ArrayList<CommonToken>(tokenStream.getTokens().size());
            tokens.addAll(tokenStream.getTokens());
            PhasedUnit phasedUnit = new PhasedUnit(file, srcDir, cu,
                    moduleManager.getCurrentPackage(), moduleManager,
                    context, tokens);
View Full Code Here


            RecognitionException {
        String moduleDescriptorPath = module.getUnit().getFullPath();
        CeylonLexer lexer = new CeylonLexer(new ANTLRFileStream(moduleDescriptorPath, encoding));
        TokenRewriteStream tokenStream = new TokenRewriteStream(lexer);
        CeylonParser parser = new CeylonParser(tokenStream);
        Tree.CompilationUnit cu = parser.compilationUnit();
        String v = this.confirm == Confirm.dependencies ? this.newVersion : confirm("update.module.version", module.getNameAsString(), module.getVersion(), this.newVersion);
        if (v == null) {
            return false;
        } else if (!v.isEmpty()) {
            // record the new version for this module
View Full Code Here

            RecognitionException {
        String moduleDescriptorPath = module.getUnit().getFullPath();
        CeylonLexer lexer = new CeylonLexer(new ANTLRFileStream(moduleDescriptorPath, encoding));
        TokenRewriteStream tokenStream = new TokenRewriteStream(lexer);
        CeylonParser parser = new CeylonParser(tokenStream);
        Tree.CompilationUnit cu = parser.compilationUnit();
        List<Tree.ImportModule> moduleImports = findUpdatedImport(cu, updatedModuleVersions);
        for (Tree.ImportModule moduleImport : moduleImports) {
            String importedModuleName = getModuleName(moduleImport);
            String newVersion = updatedModuleVersions.get(importedModuleName);
            if(newVersion == null)
View Full Code Here

        } else if (dependencies) {
            String moduleDescriptorPath = module.getUnit().getFullPath();
            CeylonLexer lexer = new CeylonLexer(new ANTLRFileStream(moduleDescriptorPath, encoding));
            CommonTokenStream tokenStream = new CommonTokenStream(lexer);
            CeylonParser parser = new CeylonParser(tokenStream);
            Tree.CompilationUnit cu = parser.compilationUnit();
            List<Tree.ImportModule> moduleImports = findImport(cu);
            for (Tree.ImportModule moduleImport : moduleImports) {
                outputDependency(module, moduleImport);
            }
        }
View Full Code Here

                CeylonLexer lexer = new CeylonLexer(input);

                CommonTokenStream tokens = new CommonTokenStream(lexer);

                CeylonParser parser = new CeylonParser(tokens);
                CompilationUnit cu = parser.compilationUnit();

                java.util.List<LexError> lexerErrors = lexer.getErrors();
                for (LexError le : lexerErrors) {
                    printError(le, le.getMessage(), "ceylon.lexer", map);
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.