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

Syntax definition problem with .location #105

Closed
redtopia opened this issue Nov 15, 2012 · 7 comments
Closed

Syntax definition problem with .location #105

redtopia opened this issue Nov 15, 2012 · 7 comments

Comments

@redtopia
Copy link

.cfm files using ColdFusion Markup syntax fails when "variableName.location" is found in the markup. The syntax definition turns the token "location" red, and then the syntax coloring fails. In my code, I have a struct key named "location", which I reference using the "dot" syntax (structName.location) syntax.

@atomi
Copy link
Contributor

atomi commented Nov 15, 2012

I can't replicate the issue.

Could you post your actual code please? Thanks.

@redtopia
Copy link
Author

Looks like it has to be inside a <cfif block.... try:

<cfif schoolInfo.profile.location NEQ ""

...

@redtopia
Copy link
Author

This also turns "location" red: rStruct["profile"]["location"] = location;

@atomi
Copy link
Contributor

atomi commented Nov 16, 2012

I'm having a little trouble with this.
location is used in cfscript as a tag operator.

I can redefine location somewhere else to fix this but other tag operators would still be problematic.
Anyway, it's probably best not to use these as variables but it definitely should not break syntax highlighting,

I'll see what I can do.
Thanks.

@redtopia
Copy link
Author

I see... I tend to agree that it's bad to use keywords like that. However, sometimes its necessary, and it's definitely not fair for Adobe to claim the keyword "location"! (Just kidding) The word "location" followed by open/close parens should be a CF token (as in the cfscript equivalent to cflocation), otherwise it should be considered a local variable. Same is true with all cfscript functions, except the weird ones like "include" and "lock".

@atomi atomi closed this as completed in ab56b3e Nov 18, 2012
@atomi
Copy link
Contributor

atomi commented Nov 18, 2012

I think this should work.
Sorry for the delay.

It makes sure the tag operators aren't matched mid statement.
But let me know if you still see issues.
Thanks.

atomi pushed a commit that referenced this issue Nov 18, 2012
@redtopia
Copy link
Author

Thanks... I'll give it a try!

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