Package org.jrubyparser.ast

Examples of org.jrubyparser.ast.RootNode


          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);
        }
        else {
          if(jsonFactory == null) {
View Full Code Here


    type.setProviders(providers);
  }

  public static void loadTypeFile(Type type, File typeFile) throws IOException {
    String typeFileStr = typeFile.getAbsolutePath();
    RootNode root = RubyParserUtils.parseFile(typeFile);
    List<Node> nodes = RubyParserUtils.findNodes(root.getBody(), new NodeType[] { NodeType.MODULENODE });
    ModuleNode puppetModule = null;
    for(Node node : nodes) {
      ModuleNode module = (ModuleNode) node;
      if("Puppet".equals(module.getCPath().getName())) {
        puppetModule = module;
View Full Code Here

TOP

Related Classes of org.jrubyparser.ast.RootNode

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.