Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PARSE_ERROR when cfloop has "delimiters" attribute #357

Closed
mpaluchowski opened this issue Jul 17, 2017 · 1 comment
Closed

PARSE_ERROR when cfloop has "delimiters" attribute #357

mpaluchowski opened this issue Jul 17, 2017 · 1 comment
Milestone

Comments

@mpaluchowski
Copy link
Contributor

mpaluchowski commented Jul 17, 2017

The following code:

<cfcomponent>
    <cffunction name="foo" returnType="void">
        <cfloop list="#bar#" index="baz" delimiters=",">
            <cfset baz>
        </cfloop>
    </cffunction>
</cfcomponent>

will cause a PARSE_ERROR when the delimiters attribute is present. This one in the resulting XML file:

<issue severity="ERROR" id="PARSE_ERROR" message="PARSE_ERROR" category="CFLint" abbrev="PE">
  <location file="C:\Inbox\cflint-test\.\test.cfc" fileName="test.cfc" function="" column="0" line="3" message="Unable to parse" variable=",">
    <Expression><![CDATA[<cfloop list="#bar#" index="baz" delimiters=",">&#x000D;&#x000A;            <cfset baz>&#x000D;&#x000A;        </cfloop>]]></Expression>
  </location>
</issue>

and this one in the console:

line 1:0 mismatched input ',' expecting {BOOLEAN_LITERAL, OPEN_STRING, CONTAINS, CONTAIN, GT, GTE, LTE, LT, EQ, NEQ, OR, TO, IMP, EQV, XOR, AND, NOT, MOD, VAR, NEW, FUNCTION, DEFAULT, '.', '+', '++', '-', '--', '!!', '!', '[', '(', '{', INCLUDE, ABORT, ADMIN, THROW, RETHROW, EXIT, PARAM, PROPERTY, LOCK, THREAD, TRANSACTION, SAVECONTENT, HTTP, CFHTTP, FILE, DIRECTORY, LOOP, SETTING, QUERY, STRING, NUMERIC, BOOLEAN, ANY, ARRAY, STRUCT, PRIVATE, PUBLIC, REMOTE, PACKAGE, REQUIRED, COMPONENT, LOG, APPLET, ASSOCIATE, AUTHENTICATE, CACHE, COL, COLLECTION, CONTENT, COOKIE, ERROR, EXECUTE, FORM, FTP, GRID, GRIDCOLUMN, GRIDROW, GRIDUPDATE, HEADER, HTMLHEAD, HTTPPARAM, CFHTTPPARAM, IMPERSONATE, INDEX, INPUT, INSERT, LDAP, LOCATION, MAIL, MAILPARAM, MODULE, OBJECT, OUTPUT, POP, PROCESSINGDIRECTIVE, PROCPARAM, PROCRESULT, QUERYPARAM, REGISTRY, REPORT, SCHEDULE, SCRIPT, SEARCH, SELECT, SERVLET, SERVLETPARAM, SET, SILENT, SLIDER, STOREDPROC, TABLE, TEXTINPUT, TREE, TREEITEM, UPDATE, WDDX, ZIP, CFCUSTOM_IDENTIFIER, IDENTIFIER, INTEGER_LITERAL, '#', FLOATING_POINT_LITERAL}
ryaneberly added a commit that referenced this issue Jul 18, 2017
Do not parse @delimeters
@ryaneberly
Copy link
Contributor

Good catch. @delimeters is removed from parsing.

@ryaneberly ryaneberly added this to the 1.2.0 milestone Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants