org.jruby.truffle.parser.ast.RationalParseNode 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 RationalParseNode extends NumericParseNode implements SideEffectFree {
private final long numerator;
private final long denominator;
public RationalParseNode(SourceIndexLength position, long numerator, long denominator) {
super(position);
this.numerator = numerator;
this.denominator = denominator;
}
@Override
public T accept(NodeVisitor visitor) {
return visitor.visitRationalNode(this);
}
@Override
public List childNodes() {
return EMPTY_LIST;
}
@Override
public NodeType getNodeType() {
return NodeType.RATIONALNODE;
}
public long getNumerator() {
return numerator;
}
public long getDenominator() {
return denominator;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy