私は次のStringTemplateグループを持っています
group RPInstr;
before(firstStat) ::= <<
<{<[beforeEnteringInstr(),firstStat]; anchor, separator="\n">}; anchor>
>>
beforeEnteringInstr() ::= "before();"
メソッドの最初のステートメントをインストルメンテーションコード( "before();")に合わせようとしています。しかし、私が今得ているのは次のようなものです。
public int method() {
before();
System.out.println("testing");
System.out.println("testing again");
}
before();をインデントする適切な方法は何ですか。そして次のステートメントなので、私は次のようになりますか?
public int method() {
before();
System.out.println("testing");
System.out.println("testing again");
}
前もって感謝します。
PS:文法で使用しているオプションは次のとおりです
オプション{出力=テンプレート; rewrite = true; backtrack = true; memoize = true;}