All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jruby.truffle.parser.ast.ComplexParseNode Maven / Gradle / Ivy

The newest version!
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.jruby.truffle.parser.ast;

import org.jruby.truffle.language.SourceIndexLength;
import org.jruby.truffle.parser.ast.visitor.NodeVisitor;

import java.util.List;

/**
 *
 * @author enebo
 */
public class ComplexParseNode extends NumericParseNode implements SideEffectFree {
    private NumericParseNode y;

    public ComplexParseNode(SourceIndexLength position, NumericParseNode y) {
        super(position);

        this.y = y;
    }

    @Override
    public  T accept(NodeVisitor visitor) {
       return visitor.visitComplexNode(this);
    }

    @Override
    public List childNodes() {
        return EMPTY_LIST;
    }

    @Override
    public NodeType getNodeType() {
        return NodeType.COMPLEXNODE;
    }

    public NumericParseNode getNumber() {
        return y;
    }

    public void setNumber(NumericParseNode y) {
        this.y = y;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy