Package org.jrubyparser.ast

Examples of org.jrubyparser.ast.ArrayNode


                else if (valueNode instanceof TrueNode)
                    args.add(new Argument(lan.getName(), ((TrueNode) valueNode).getName(), Type.BOOLEAN));
                else if (valueNode instanceof FalseNode)
                    args.add(new Argument(lan.getName(), ((FalseNode) valueNode).getName(), Type.BOOLEAN));
                else if (valueNode instanceof ArrayNode && ((ArrayNode) valueNode).size() > 0) {
                    ArrayNode arrayNode = (ArrayNode) valueNode;
                    List<String> argValue = getListValue(arrayNode);
                    if (argValue != null) {
                        Node node2 = arrayNode.get(0);
                        Type type = Type.NONE;
                        if (node2 instanceof StrNode)
                            type = Type.STRING;
                        else if (node2 instanceof RegexpNode)
                            type = Type.REGEX;
View Full Code Here


    private String validWithCallNode(FCallNode node) {
        Node argsNode = node.getArgsNode();
        if (!(argsNode instanceof ArrayNode))
            return null;
        ArrayNode aNode = (ArrayNode) argsNode;
        if (aNode.size() != 1)
            return null;
        Node node2 = aNode.get(0);
        if (!(node2 instanceof StrNode))
            return null;
        return ((StrNode) node2).getValue();
    }
View Full Code Here

   * @param argsNode
   * @return
   */
  private Node getTaskNameNodeFromArgNode(Node argsNode) {
    if(argsNode instanceof ArrayNode) {
      ArrayNode arrayNode = (ArrayNode) argsNode;
      if(arrayNode.size() > 0) {
        Node a = arrayNode.get(0);
        if(a instanceof HashNode) {
          HashNode argsHash = (HashNode) a;
          ListNode listNode = argsHash.getListNode();
          if(listNode.size() > 0)
            argsNode = listNode.get(0);
View Full Code Here

TOP

Related Classes of org.jrubyparser.ast.ArrayNode

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.