cflint / CFLint

Static code analysis for CFML (a linter)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in parsing AND IndexOutOfBoundsException: token index -1 out of range 0..1

Vintic opened this issue · comments

Obtain this error:
Error in parsing : in on tag cfparam
java.lang.IndexOutOfBoundsException: token index -1 out of range 0..1
at org.antlr.v4.runtime.BufferedTokenStream.get(BufferedTokenStream.java:186)
at com.cflint.CFLint.syntaxError(CFLint.java:1600)
...

Code to check:

<cfparam name="in" default=-1>
<html>
<body>
<font color="#6e7b8b" face="Arial" size="5"><b><cfif in>Welcome<cfelse>Goodbye</cfif>:</b></font>
</body>
</html>

This is due to using that variable name in. I think it is being interpreted as a keyword, but in is only a keyword in script syntax and in Lucee it's not even reserved,