ASTNumber.java 1.01 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.forms.formcalc;

import com.adobe.forms.formcalc.CalcTransParser;
import com.adobe.forms.formcalc.CalcTransParserVisitor;
import com.adobe.forms.formcalc.SimpleNode;

public class ASTNumber
extends SimpleNode {
    private int type;
    private String literal;

    public ASTNumber(int id) {
        super(id);
    }

    public ASTNumber(CalcTransParser p, int id) {
        super(p, id);
    }

    @Override
    public Object jjtAccept(CalcTransParserVisitor visitor, Object data) {
        return visitor.visit(this, data);
    }

    public int getType() {
        return this.type;
    }

    @Override
    public String toString() {
        return super.toString() + (this.type == 9 ? " Integer: " : " Real: ") + this.literal;
    }

    public void setType(int type) {
        this.type = type;
    }

    @Override
    public String getLiteral() {
        return this.literal;
    }

    public void setLiteral(String literal) {
        this.literal = literal;
    }
}