@Test public void evaluateExpressionWithRecursiveReplacements() { AttributedString result = underTest.evaluate("@{underline foo @{fg:cyan bar}}"); System.out.println(result.toAnsi()); assert result.equals(new AttributedStringBuilder().append("foo ", DEFAULT.underline()).append("bar", DEFAULT.underline().foreground(CYAN)).toAttributedString()); }
public void evaluate(final AttributedStringBuilder buff, final String expression) { requireNonNull(buff); requireNonNull(expression); String translated = InterpolationHelper.substVars(expression, this::style, false); buff.appendAnsi(translated); }
StyleExpression { public void evaluate(final AttributedStringBuilder buff, final String expression) { requireNonNull(buff); requireNonNull(expression); String translated = InterpolationHelper.substVars(expression, this::style, false); buff.appendAnsi(translated); } }
StyleExpression { public void evaluate(final AttributedStringBuilder buff, final String expression) { requireNonNull(buff); requireNonNull(expression); String translated = InterpolationHelper.substVars(expression, this::style, false); buff.appendAnsi(translated); } StyleExpression();  StyleExpression(final StyleResolver resolver); }
StyleExpression { public void evaluate(final AttributedStringBuilder buff, final String expression) { requireNonNull(buff); requireNonNull(expression); String translated = InterpolationHelper.substVars(expression, this::style, false); buff.appendAnsi(translated); } StyleExpression();  StyleExpression(final StyleResolver resolver); void evaluate(final AttributedStringBuilder buff, final String expression); AttributedString evaluate(final String expression); }
StyleExpression { public void evaluate(final AttributedStringBuilder buff, final String expression) { requireNonNull(buff); requireNonNull(expression); String translated = InterpolationHelper.substVars(expression, this::style, false); buff.appendAnsi(translated); } StyleExpression();  StyleExpression(final StyleResolver resolver); void evaluate(final AttributedStringBuilder buff, final String expression); AttributedString evaluate(final String expression);  }