25 lines
638 B
Java
25 lines
638 B
Java
package io.gitlab.jfronny.muscript.ast;
|
|
|
|
import io.gitlab.jfronny.muscript.ast.dynamic.DynamicCoerce;
|
|
import io.gitlab.jfronny.muscript.compiler.Order;
|
|
import io.gitlab.jfronny.muscript.compiler.Type;
|
|
|
|
public abstract non-sealed class StringExpr extends Expr<String> {
|
|
protected StringExpr(Order order, int chStart, int chEnd) {
|
|
super(order, chStart, chEnd);
|
|
}
|
|
|
|
@Override
|
|
public Type getResultType() {
|
|
return Type.String;
|
|
}
|
|
|
|
@Override
|
|
public abstract StringExpr optimize();
|
|
|
|
@Override
|
|
public DynamicExpr asDynamicExpr() {
|
|
return new DynamicCoerce(chStart, chEnd, this);
|
|
}
|
|
}
|