2022-06-07 13:36:48 +02:00
|
|
|
package io.gitlab.jfronny.muscript.compiler.expr.string;
|
|
|
|
|
|
|
|
import io.gitlab.jfronny.commons.*;
|
|
|
|
import io.gitlab.jfronny.muscript.compiler.expr.*;
|
|
|
|
import io.gitlab.jfronny.muscript.dynamic.*;
|
|
|
|
|
|
|
|
public class StringCoerce extends StringExpr {
|
|
|
|
private final Expr<?> inner;
|
|
|
|
|
2022-06-13 13:31:54 +02:00
|
|
|
public StringCoerce(int character, Expr<?> inner) {
|
|
|
|
super(character);
|
2022-06-07 13:36:48 +02:00
|
|
|
this.inner = inner;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2022-06-13 13:31:54 +02:00
|
|
|
public String get(Dynamic<?> dataRoot) {
|
|
|
|
return StringFormatter.toString(inner.get(dataRoot));
|
2022-06-07 13:36:48 +02:00
|
|
|
}
|
|
|
|
}
|