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 using comparison operators in struct assignment #233

Closed
CamBurris opened this issue Jan 9, 2017 · 1 comment
Closed

Parse error using comparison operators in struct assignment #233

CamBurris opened this issue Jan 9, 2017 · 1 comment

Comments

@CamBurris
Copy link

I get the following errors when parsing a file that uses comparison operators in a struct assignment. You can also see that triggers a false positive missing semicolon error as well.

[ {
  "severity" : "ERROR",
  "id" : "MISSING_SEMI",
  "message" : "MISSING_SEMI",
  "category" : "CFLINT",
  "abbrev" : "MS",
  "locations" : [ {
    "fileName" : "onLoad.cfm",
    "function" : "",
    "column" : "1",
    "line" : "8",
    "message" : "End of statement(;) expected instead of }",
    "variable" : "",
    "expression" : "}"
  } ]
}, {
  "severity" : "ERROR",
  "id" : "PARSE_ERROR",
  "message" : "PARSE_ERROR",
  "category" : "CFLINT",
  "abbrev" : "PE",
  "locations" : [ {
    "fileName" : "onLoad.cfm",
    "function" : "",
    "column" : "10",
    "line" : "4",
    "message" : "Unable to parse",
    "variable" : "",
    "expression" : "no viable alternative at input '{\"a\":0<'"
  } ]
} ]

Sample code that triggers error:

<cfscript>
	public struct function onLoad() output="false" {
		local.a = {
			"a": 0 < 1
		};

		return local.a;
	}
</cfscript>
ryaneberly added a commit to cfparser/cfparser that referenced this issue Jan 15, 2017
@ryaneberly
Copy link
Contributor

thanks. fixed in CFParser

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