Package org.jrubyparser.ast

Examples of org.jrubyparser.ast.InstAsgnNode


    if(nodes.isEmpty())
      // No block when there's just one assignment
      nodes = RubyParserUtils.findNodes(iterNode, new NodeType[] { NodeType.INSTASGNNODE });

    for(Node node : nodes) {
      InstAsgnNode asgnNode = (InstAsgnNode) node;
      if(!"@doc".equals(asgnNode.getName()))
        continue;

      Node valueNode = asgnNode.getValue();
      if(valueNode instanceof StrNode)
        type.setDocumentation(((StrNode) valueNode).getValue());
      break;
    }
View Full Code Here


          // A call to 'ensurable' adds 'ensure' parameter
          if(ENSURABLE.equals(vcallNode.getName()))
            parameterMap.put("ensure", new PPTypeInfo.Entry("", false, false));
          break;
        case INSTASGNNODE:
          InstAsgnNode docNode = (InstAsgnNode) n;
          if("@doc".equals(docNode.getName())) {
            typeDocumentation = getStringArgDefault(docNode.getValue(), "");
          }
          break;
        default:
          break;
      }
View Full Code Here

          // A call to 'ensurable' adds 'ensure' parameter
          if(ENSURABLE.equals(vcallNode.getName()))
            parameterMap.put("ensure", new PPTypeInfo.Entry("", false, false));
          break;
        case INSTASGNNODE:
          InstAsgnNode docNode = (InstAsgnNode) n;
          if("@doc".equals(docNode.getName())) {
            typeDocumentation = getStringArgDefault(docNode.getValue(), "");
          }
          break;
        default:
          break;
      }
View Full Code Here

      // }
      // for (Node n2 : cn.getBodyNode().childNodes()) {
      // if (n.getNodeType() == NodeType.NEWLINENODE)
      // n = ((NewlineNode) n).getNextNode();
      if(n.getNodeType() == NodeType.INSTASGNNODE) {
        InstAsgnNode instAsgn = (InstAsgnNode) n;
        if("@levels".equals(instAsgn.getName())) {
          Object value = new ConstEvaluator().eval(instAsgn.getValue());
          if(!(value instanceof List<?>))
            return functions;
          for(Object o : (List<?>) value) {
            functions.add(new PPFunctionInfo((String) o, false, "Log a message on the server at level " +
                o + "."));
View Full Code Here

TOP

Related Classes of org.jrubyparser.ast.InstAsgnNode

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.