4

次の StringTemplate では、 の後の右中括弧が原因で、「無効な文字 '}'」例外が発生しますreturn null;

$StatementList:{statement | 
public T $statement$(X x) { return null; }  }$

次のような出力が必要です。

public T statement1(X x) {return null; }
public T statement2(X x) {return null; }

この閉じ中括弧をエスケープするにはどうすればよいですか?

4

2 に答える 2