You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/src/main/java/chocopy/common/astnodes/IntegerLiteral.java

30 lines
621 B

package chocopy.common.astnodes;
import chocopy.common.analysis.NodeAnalyzer;
import java_cup.runtime.ComplexSymbolFactory.Location;
/**
* Integer numerals.
*/
public final class IntegerLiteral extends Literal {
/**
* Value denoted.
*/
public final int value;
/**
* The AST for the literal VALUE, spanning source
* locations [LEFT..RIGHT].
*/
public IntegerLiteral(Location left, Location right, int value) {
super(left, right);
this.value = value;
}
public <T> T dispatch(NodeAnalyzer<T> analyzer) {
return analyzer.analyze(this);
}
}