CFLint icon indicating copy to clipboard operation
CFLint copied to clipboard

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

Open Vintic opened this issue 6 years ago • 1 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>

Vintic avatar Feb 21 '20 08:02 Vintic

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,

KamasamaK avatar Mar 07 '20 03:03 KamasamaK