Package org.jruby.parser

Examples of org.jruby.parser.RubyParser


    FileInputStream input = new FileInputStream(file);
    LexerSource source = new InputStreamLexerSource(file.getPath(),
        input, lexerCapture, startLine, extraPositionInfo);

    // Get a parser
    RubyParser parser = RubyParserPool.getInstance().borrowParser(rubyVersion);

    // Create a warnings collector to give to the parser
    RubyParserWarningsCollector warnings = new RubyParserWarningsCollector(rubyRuntime);
    parser.setWarnings(warnings);
    RubyParserResult parserResult = null;
    try {
      parserResult = parser.parse(parserConfiguration, source);
    } catch (SyntaxException e) {
      warnings.syntaxError(e);
    } finally {
      RubyParserPool.getInstance().returnParser(parser);
    }
View Full Code Here

TOP

Related Classes of org.jruby.parser.RubyParser

Copyright © 2018 www.massapicom. 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.