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

Allow apostrophes in single-line comments #56

Merged
merged 2 commits into from
Jul 10, 2017
Merged

Allow apostrophes in single-line comments #56

merged 2 commits into from
Jul 10, 2017

Conversation

mkovacs-coursera
Copy link
Contributor

@mkovacs-coursera mkovacs-coursera commented Apr 7, 2017

Updates the schema language grammar to allow apostrophes in single-line comments.
Fixes #38.

@mkovacs-coursera mkovacs-coursera changed the title fix #38 allow apostrophes in single-line comments Apr 7, 2017
@mkovacs-coursera mkovacs-coursera changed the title allow apostrophes in single-line comments Allow apostrophes in single-line comments Apr 7, 2017
@@ -158,7 +158,7 @@ NULL_LITERAL: 'null';

SCHEMADOC_COMMENT: '/**' .*? '*/';
BLOCK_COMMENT: '/*' .*? '*/' -> skip;
LINE_COMMENT: '//' ~['\r\n']* -> skip;
LINE_COMMENT: '//' ~[\r\n]* -> skip;

Choose a reason for hiding this comment

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

Are you sure you really want to remove the ' after \r\n?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's what we want, with high confidence.
A substring that starts with // and continues with any number of characters not \r or \n is a single-line (and non-doc) comment and thus should be skipped.

@mkovacs-coursera mkovacs-coursera merged commit bc38225 into coursera:master Jul 10, 2017
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.

2 participants