Package org.jrubyparser.ast

Examples of org.jrubyparser.ast.Node.childNodes()


   */
  public PPTypeInfo findMetaTypeInfo(Node root) {
    Map<String, PPTypeInfo.Entry> parameterMap = Maps.newHashMap();
    RubyModuleFinder moduleFinder = new RubyModuleFinder();
    Node module = moduleFinder.findModule(root, new String[] { "Puppet" });
    for(Node n : module.childNodes()) {
      if(n.getNodeType() == NodeType.NEWLINENODE)
        n = ((NewlineNode) n).getNextNode();
      if(n.getNodeType() == NodeType.CLASSNODE) {
        ClassNode classNode = (ClassNode) n;
        // could check if this is the class 'Type' but somewhat
View Full Code Here


    if(module == null)
      module = root.getNodeType() == NodeType.ROOTNODE
          ? ((RootNode) root).getBody()
          : root;
    OpCallVisitor opCallVisitor = new OpCallVisitor();
    for(Node n1 : module.childNodes()) {
      if(n1.getNodeType() == NodeType.NEWLINENODE)
        n1 = ((NewlineNode) n1).getNextNode();
      Iterable<Node> nodeIterable = null;
      if(n1.getNodeType() == NodeType.BLOCKNODE)
        nodeIterable = ((BlockNode) n1).childNodes();
View Full Code Here

  PPTypeInfo.Entry getEntry(BlockAcceptingNode callNode) {
    String desc = "";
    boolean namevar = false;
    Node bodyNode = safeGetBodyNode(callNode);
    if(bodyNode != null)
      for(Node n : bodyNode.childNodes()) {
        if(n.getNodeType() == NodeType.NEWLINENODE)
          n = ((NewlineNode) n).getNextNode();
        if(n.getNodeType() == NodeType.FCALLNODE) {
          FCallNode cn = (FCallNode) n;
          if("desc".equals(cn.getName()))
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.