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 unable to parse #547

Closed
bardware opened this issue Feb 27, 2018 · 4 comments
Closed

PARSE_ERROR unable to parse #547

bardware opened this issue Feb 27, 2018 · 4 comments
Labels

Comments

@bardware
Copy link

I have this code. CFLint in VSCode reports PARSE_ERROR unable to parse and underlines compile while the trailing comma is the culprit.
I'm sorry, I have not looked into it now but what does CFlint report as bad? The call to compile or does it recognize the superfluous comma?

		<cfset local.pattern = createObject(
			"java",
			"java.util.regex.Pattern"
			).compile(
				javaCast( "string", "^\d+(,\d+)*$", )
			)
		>

grafik

@bardware
Copy link
Author

CFlint reports column 9 in line 4.
CFLint 1.2.3 reported column 0, line 4 .

output in JSON format looks like:

{
  "version" : "1.3.0",
  "timestamp" : 1519766449,
  "issues" : [ {
    "severity" : "ERROR",
    "id" : "PARSE_ERROR",
    "message" : "PARSE_ERROR",
    "category" : "CFLINT",
    "abbrev" : "PE",
    "locations" : [ {
      "file" : "D:\\Webs\\tester-002\\parse_error.cfm",
      "fileName" : "parse_error.cfm",
      "function" : "",
      "column" : 9,
      "line" : 4,
      "message" : "Unable to parse",
      "variable" : "compile",
      "expression" : "<cfset local.pattern = createObject(\n\t\"java\",\n\t\"java.util.regex.Pattern\"\n\t).compile(\n\t\tjavaCast( \"string\", \"^\\d+(,\\d+)*$\", )\n\t)\n>"
    } ]
  }

@KamasamaK
Copy link
Collaborator

As you mentioned, this PARSE_ERROR is due to the trailing comma. Is your issue that it is targeting compile? The fact that it produces a parsing error is correct.

@ryaneberly
Copy link
Contributor

ryaneberly commented May 4, 2018 via email

@ryaneberly ryaneberly added the bug label Jun 1, 2018
@ryaneberly
Copy link
Contributor

I think that the best locating the parser can do at this point for parse errors. closing for now.

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