Stringtemplate-4: using "@" as custom separator
When using StringTemplate 4.0.2 the following object construct:
ST st = new ST("@myToken@", '@', '@');
throws an exception:
1:8: '@' came as a complete surprise to me
Exception in thread "main" org.stringtemplate.v4.compiler.STException
at org.stringtemplate.v4.compiler.Compiler.reportMessageAndThrowSTException(Compiler.java:213)
at org.stringtemplate.v4.compiler.Compiler.compile(Compiler.java:143)
at org.stringtemplate.v4.STGroup.compile(STGroup.java:427)
at org.stringtemplate.v4.ST.<init>(ST.java:142)
at org.stringtemplate.v4.ST.<init>(ST.java:136)
Is there any special way to use the "@" character as a custom delimiter, or is it just not allowed?
+3
source to share