Package org.jrubyparser

Examples of org.jrubyparser.Parser


    private Module loadFunctionsFromFile(File file, Module parent) {
        try {
            Properties docNodes = collectDocNodes(file);
            Module module = new Module(getModuleName(file), true, parent);
            Parser parser = new Parser();
            Node node = parser.parse(file.getName(), new FileReader(file), new ParserConfiguration());
            List<Node> defnNodes = findNodes(node, new INodeFilter() {

                public void visitStart(Node node) {
                }
View Full Code Here


    if(document != null) {
      try {
        if(MODULEFILE_NAME.equals(path.lastSegment())) {
          if(rubyParser == null) {
            serializer = RubyValueSerializer.INSTANCE;
            rubyParser = new Parser();
            rubyParserConfig = new ParserConfiguration(0, CompatVersion.RUBY1_9);
          }
          RootNode root = (RootNode) rubyParser.parse(
            path.toOSString(), new StringReader(document.get()), rubyParserConfig);
          new LenientModulefileParser(this).parseRubyAST(root, chain);
View Full Code Here

        findNodes(child, path, pathIndex, result);
    }
  }

  public static RootNode parse(String id, Reader reader) throws SyntaxException {
    Parser parser = new Parser();
    return (RootNode) parser.parse(id, reader, new ParserConfiguration(0, CompatVersion.RUBY1_9));
  }
View Full Code Here

TOP

Related Classes of org.jrubyparser.Parser

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.