Package org.jruby.ast

Examples of org.jruby.ast.NewlineNode


        // TODO: add trace call?
        context.lineNumber(node.getPosition());

        context.setLinePosition(node.getPosition());

        NewlineNode newlineNode = (NewlineNode) node;

        compile(newlineNode.getNextNode(), context);
    }
View Full Code Here


  break;
case 222:
          // line 862 "DefaultRubyParser.y"
  {
                  support.checkExpression(((Node)yyVals[-1+yyTop]));
      yyVal = new NewlineNode(getPosition(((Token)yyVals[-2+yyTop])), support.newSplatNode(getPosition(((Token)yyVals[-2+yyTop])), ((Node)yyVals[-1+yyTop])));
              }
  break;
case 223:
          // line 867 "DefaultRubyParser.y"
  {
View Full Code Here

     *@return a NewlineNode or null if node is null.
     */
    public Node newline_node(Node node, ISourcePosition position) {
        if (node == null) return null;
       
        return node instanceof NewlineNode ? node : new NewlineNode(position, node);
    }
View Full Code Here

    public Node getConditionNode(Node node) {
        if (node == null) return NilImplicitNode.NIL;

        if (node instanceof NewlineNode) {
            return new NewlineNode(node.getPosition(), cond0(((NewlineNode) node).getNextNode()));
        }

        return cond0(node);
    }
View Full Code Here

    for (int i = 0; i < children.size(); i++) {
      Node child = (Node) children.get(i);
      if (child instanceof ClassNode) {
        return (ClassNode) child;
      } else if (child instanceof NewlineNode) {
        NewlineNode nn = (NewlineNode) child;
        Node found = findClassNode(nn.getNextNode());
        if (found instanceof ClassNode) {
          return (ClassNode) found;
        }
      }
    }
View Full Code Here

        context.setLinePosition(node.getPosition());

        if (RubyInstanceConfig.FULL_TRACE_ENABLED) context.traceLine();

        NewlineNode newlineNode = (NewlineNode) node;

        compile(newlineNode.getNextNode(), context, expr);
    }
View Full Code Here

    for (int i = 0; i < children.size(); i++) {
      Node child = (Node) children.get(i);
      if (child instanceof ClassNode) {
        return (ClassNode) child;
      } else if (child instanceof NewlineNode) {
        NewlineNode nn = (NewlineNode) child;
        Node found = findClassNode(nn.getNextNode());
        if (found instanceof ClassNode) {
          return (ClassNode) found;
        }
      }
    }
View Full Code Here

     *@return a NewlineNode or null if node is null.
     */
    public Node newline_node(Node node, ISourcePosition position) {
        if (node == null) return null;
       
        return node instanceof NewlineNode ? node : new NewlineNode(position, node);
    }
View Full Code Here

    public Node getConditionNode(Node node) {
        if (node == null) return NilImplicitNode.NIL;

        if (node instanceof NewlineNode) {
            return new NewlineNode(node.getPosition(), cond0(((NewlineNode) node).getNextNode()));
        }

        return cond0(node);
    }
View Full Code Here

    for (int i = 0; i < children.size(); i++) {
      Node child = (Node) children.get(i);
      if (child instanceof ClassNode) {
        return (ClassNode) child;
      } else if (child instanceof NewlineNode) {
        NewlineNode nn = (NewlineNode) child;
        Node found = findClassNode(nn.getNextNode());
        if (found instanceof ClassNode) {
          return (ClassNode) found;
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.jruby.ast.NewlineNode

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.