Sha256: 88697ae46daf387b51c140daa0d11e1302c60b8a1200565dbf8b46ed00c0fc0f

Contents?: true

Size: 1.11 KB

Versions: 135

Compression:

Stored size: 1.11 KB

Contents

/**
 * Copyright 2005-2007 Xue Yong Zhi
 * Distributed under the BSD License
 */

package com.xruby.compiler.codedom;

import antlr.RecognitionException;
import java.util.ArrayList;

public class ForInExpression extends Expression {

    private Expression exp_;
    private Block block_;

    public ForInExpression(Expression exp, Block block) {
        exp_ = exp;
        block_= block;
        block_.setIsForInExpression();
    }

    public void accept(CodeVisitor visitor) {
        block_.initAllParametersToNil(visitor);
        block_.setStartPosition(position);

        MethodCallExpression e;
        try {
            e = new MethodCallExpression(exp_, "each", null, block_);
        } catch (RecognitionException e1) {
            throw new Error(e1);
        }
        e.accept(visitor);
    }

    void pullBlock(ArrayList<Block> result) {
        if (null != block_) {
            result.add(block_);
        }
    }

    void getNewlyAssignedVariables(ISymbolTable symboltable, ArrayList<String> result) {
        block_.getNewlyAssignedVariables(symboltable, result);
    }
}

Version data entries

135 entries across 135 versions & 2 rubygems

Version Path
rhodes-7.6.0 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-7.5.1 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-7.4.1 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-7.1.17 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-6.2.0 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-6.0.11 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.18 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.17 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.15 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.0.22 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.2 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.0.7 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.0.3 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-5.5.0 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
tauplatform-1.0.3 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
tauplatform-1.0.2 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
tauplatform-1.0.1 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-3.5.1.12 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-3.3.5 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java
rhodes-3.4.2 platform/shared/xruby/src/com/xruby/compiler/codedom/ForInExpression.java