Closed t-oster closed 2 years ago
hi! I believe i
is a reserved word used for iteration with template apply operations. See https://github.com/antlr/stringtemplate4/blob/master/doc/cheatsheet.md
would you accept a PR, which would change st.add(x, y)
to throw an IllegalArgumentException when called with x in [true, false, import, default, key, group, implements, first, last, rest, trunc, strip, trim, length, strlen, reverse, if, else, elseif, endif,
I'm trying to think if that could cause any trouble. Seems like the better way would be to look for improper keyword use as a variable.. hmm... maybe not. Is there a list of reserved words already in the code?
This works (from
org.stringtemplate.v4.test.TestCoreBasics
):this does not:
all characters except i work.