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 "function" used as variable name #364

Closed
mpaluchowski opened this issue Jul 24, 2017 · 4 comments
Closed

PARSE_ERROR when "function" used as variable name #364

mpaluchowski opened this issue Jul 24, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@mpaluchowski
Copy link
Contributor

The word function, used as a variable name, triggers a PARSE_ERROR. It's not among the list of reserved words and the code works fine. There could be a new rule advising to avoid using reserved words for other purposes than their intended ones, but it shouldn't be causing parsing errors.

Here are some test cases:

public function init(required any function, required any foo) {}
<cfloop array="#function.subcategories#" index="subCategory">
  <li>#subCategory.description#</li>
</cfloop>
@TheRealAgentK
Copy link
Collaborator

I feel this is a cfparser issue.

@ryaneberly
Copy link
Contributor

ryaneberly commented Jul 26, 2017 via email

@denuno
Copy link
Collaborator

denuno commented Jul 26, 2017

I've got a fix for it, BTW.

@ryaneberly ryaneberly added this to the 1.3.0 milestone Jul 28, 2017
@ryaneberly
Copy link
Contributor

This will be in 1.3.0 which will use the next version of cfparser
cfparser/cfparser#83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants