使用 Rythm 将变量与其他文本连接起来

Concatenating a variable with other text using Rythm

我正在使用 Rythm 模板引擎。我有一个变量,我想 'concatenate' 它与其他没有任何空格的文本。我不知道如何分隔我的变量名和周围的文本 - Rythm 尝试将变量名和额外文本解析为单个表达式。

这是一个例子:

@args String who
Hello @whoextra

我在 http://fiddle.rythmengine.org 上尝试时出现以下错误:

org.rythmengine.exception.CompileException: whoextra cannot be resolved to a variable

如果'who'的值为'World',我要打印的是:

Hello Worldextra

我可以通过以下方式实现:

@args String who
Hello @who.raw()extra

但它似乎有点冗长,尤其是当我在很多地方使用它时。

有没有更好的方法来在 Rythm 中分隔我的表情?

()分隔:

@args String who
Hello @(who)extra

有关 Rythm 模板中表达式的更多信息,请查看 http://rythmengine.org/doc/template_guide.md#expression