Parentheses right after variable
Closed this issue · 2 comments
andrey-vasilyev commented
Hello, I can't figure out how to make this simple template work, could someone please help?
@args (String var)
@var(hello)
So the expectation is to get World(hello)
when var
is equal to World
But I get compilation failure:
java: cannot find symbol
symbol: variable hello
jjlauer commented
You should be able to use the @() syntax to wrap your var so that the java syntax parsing ends within that. For example @(var)()
should evaluate var within the first set of parentheses, then then next () will be printed out as standard text.
andrey-vasilyev commented
This works, thank you very much.