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 NumberExpr extends Expr { protected NumberExpr(Order order, int chStart, int chEnd) { super(order, chStart, chEnd); } @Override public Type getResultType() { return Type.Number; } @Override public abstract NumberExpr optimize(); @Override public DynamicExpr asDynamicExpr() { return new DynamicCoerce(chStart, chEnd, this); } }