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

MISSING_VAR reports cfwddx() attributes #483

Closed
eppinger opened this issue Oct 30, 2017 · 9 comments
Closed

MISSING_VAR reports cfwddx() attributes #483

eppinger opened this issue Oct 30, 2017 · 9 comments
Assignees
Labels
Milestone

Comments

@eppinger
Copy link

sample
cfwddx(action="cfml2wddx", input="#attribs#" output="attribsWDDX");

reports
Variable action is not declared with a var statement., etc

@eppinger eppinger changed the title MISSING_VAR reports cfmail() attributes MISSING_VAR reports cfwddx() attributes Oct 30, 2017
@TheRealAgentK
Copy link
Collaborator

Hey Andreas, thx for logging these. I wonder if this and #482 is a general problem with this kind of cfscript syntax in the parsing process.

From what I can see is that it thinks cfwddx and cfmail in your other example are user functions and then looks for a named arguments action etc --- that is never defined as a local variable.

@ryaneberly - would that a fair assessment?

@eppinger
Copy link
Author

i think it is tag specific.

throw message="" reports var not declared
cfthrow(message="") is ok

and #482 is for both variants
cfmail() and mail reports var not declared

@ryaneberly ryaneberly added the bug label Nov 1, 2017
@ryaneberly ryaneberly self-assigned this Nov 1, 2017
@ryaneberly
Copy link
Contributor

I will look at what we did for throw and see what can done about this one.

@ryaneberly
Copy link
Contributor

Does anyone have the spec for the rather awkward form:
tag attribute=value
for all of the cftags?

It's going to take hard coding those special cases in the parser as far as I can tell.

@TheRealAgentK
Copy link
Collaborator

"yay" :-/

I'm not sure if there IS a spec. IIRC the official line from Adobe was that all tags can be used this way with all attributes each tags supports.

Is that correct, @eppinger ?

@eppinger
Copy link
Author

eppinger commented Nov 2, 2017

the tag attribute=value syntax was the first lucee implementation in cfscript

Adobe uses in cf11+ the cftag(attribute=value) syntax.

Lucee supports now both variants.

https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-tags/tags-r-s/cfscript.html
https://helpx.adobe.com/coldfusion/developing-applications/the-cfml-programming-language/extending-coldfusion-pages-with-cfml-scripting/what-is-supported-in-cfscript.html

@ryaneberly
Copy link
Contributor

Ah, I thought Adobe led the way in interesting language decisions... Thanks @eppinger I'll see what we can do in cfparser.

@ryaneberly ryaneberly added this to the 1.3.0 milestone Dec 16, 2017
ryaneberly added a commit to cfparser/cfparser that referenced this issue Dec 17, 2017
ryaneberly added a commit that referenced this issue Dec 21, 2017
ryaneberly added a commit that referenced this issue Dec 21, 2017
@ryaneberly
Copy link
Contributor

cfparser 2.6.0 is out, and I believe the issues in this task are resolved.

@ryaneberly
Copy link
Contributor

This will be included in 1.3.0

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

3 participants