Package org.jrubyparser.ast

Examples of org.jrubyparser.ast.ModuleNode


  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;
        break;
      }
    }
View Full Code Here


    List<GenericCallNode> result = null;

    SEARCH: {
      switch(root.getNodeType()) {
        case MODULENODE:
          ModuleNode module = (ModuleNode) root;
          // Evaluate the name(s)
          pushNames(constEvaluator.stringList(constEvaluator.eval(module.getCPath())));
          if(!inCompatibleScope())
            break SEARCH;
          break; // search children

        case CLASSNODE:
View Full Code Here

TOP

Related Classes of org.jrubyparser.ast.ModuleNode

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.