Programming-Language-Design / src / ast / expression / classes / CharLiteral.java
CharLiteral.java
Raw
package ast.expression.classes;

import ast.expression.AbstractExpression;
import visitor.Visitor;

public class CharLiteral extends AbstractExpression {

    char value;

    public CharLiteral(int line, int column, char value) {
        super(line, column);
        this.value = value;
    }

    public char getValue() {
        return value;
    }

    public void setValue(char value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return Character.toString(getValue());
    }

    @Override
    public <TP, TR> TR accept(Visitor<TP, TR> v, TP param) {
        return v.visit(this, param);
    }
}