Package org.cx4a.rsense.ruby

Examples of org.cx4a.rsense.ruby.Frame


    public static void pushLoopFrame(Context context, Vertex returnVertex, Vertex yieldVertex) {
        pushLoopFrame(context, context.getCurrentFrame(), returnVertex, yieldVertex);
    }
   
    public static void pushLoopFrame(Context context, Frame prev, Vertex returnVertex, Vertex yieldVertex) {
        Frame frame = context.pushFrame(prev.getModule(), prev.getName(), prev.getSelf(), prev.getBlock(), prev.getVisibility());
        frame.setTag(new LoopTag(returnVertex, yieldVertex));
    }
View Full Code Here


        unsupportedNode(node);
        return Vertex.EMPTY;
    }
   
    public Object visitBreakNode(BreakNode node) {
        Frame frame = context.getCurrentFrame();
        LoopTag loopTag = RuntimeHelper.getFrameLoopTag(frame);
        if (loopTag != null) {
            Vertex vertex = createVertex(node.getValueNode());
            if (loopTag.getYieldVertex() != null)
                addEdgeAndPropagate(vertex, loopTag.getYieldVertex());
View Full Code Here

    public Object visitNewlineNode(NewlineNode node) {
        return createVertex(node.getNextNode());
    }

    public Object visitNextNode(NextNode node) {
        Frame frame = context.getCurrentFrame();
        LoopTag loopTag = RuntimeHelper.getFrameLoopTag(frame);
        if (loopTag != null && loopTag.getYieldVertex() != null) {
            Vertex vertex = createVertex(node.getValueNode());
            if (loopTag.getYieldVertex() != null)
                addEdgeAndPropagate(vertex, loopTag.getYieldVertex());
View Full Code Here

    public Object visitRetryNode(RetryNode node) {
        return Vertex.EMPTY;
    }
   
    public Object visitReturnNode(ReturnNode node) {
        Frame frame = context.getCurrentFrame();
        Template template = RuntimeHelper.getFrameTemplate(frame);
        if (template != null) {
            Vertex vertex = createVertex(node.getValueNode());
            addEdgeAndPropagate(vertex, template.getReturnVertex());
            return vertex;
View Full Code Here

TOP

Related Classes of org.cx4a.rsense.ruby.Frame

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.