Skip to content

Conversation

PalAditya
Copy link
Contributor

Fixes #602

The error came from the fact that token type comment was not expected within array literal, so added that case to handle that error. Also added multiple test cases in testsrc/org/mozilla/javascript/tests/ParserTest.java under the function testCommentInArray() to check all possible cases (single/multiple/no comments, and comments between literals)

Please mention if something else needs to be fixed for this PR 😄

@PalAditya
Copy link
Contributor Author

Capture
Just adding the local Jacoco coverage for easy reference :)

Copy link
Collaborator

@gbrail gbrail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great -- a test case that broke before and a change that fixes it. Works for me!

If you have time, I'd prefer that you change the formatting of the changes to match the lines around them, however.

@gbrail
Copy link
Collaborator

gbrail commented Oct 10, 2019

Thanks! I'm going to squash these two commits into one and merge them.

@gbrail gbrail merged commit e85ebaf into mozilla:master Oct 10, 2019
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

Successfully merging this pull request may close these issues.

Syntax error with comments in array declaration
2 participants