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

JavaScript: don't make EOF be a part of template string #1530

Conversation

masatake
Copy link
Member

EOF char was mistakenly appended to a token of template string.

Close #1493.

Signed-off-by: Masatake YAMATO yamato@redhat.com

@masatake masatake requested a review from b4n August 19, 2017 21:13
@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 85.707% when pulling 004d0c5 on masatake:handle-eof-in-template-string-of-jscript into 2140bbd on universal-ctags:master.

Copy link
Member

@b4n b4n left a comment

Choose a reason for hiding this comment

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

Looks mostly sound to me, just the one minor comment.

@@ -511,11 +511,15 @@ static void parseTemplateString (vString *const string)
c = getcFromInputFile ();
if (c == '`')
break;
vStringPut (string, c);

if (c != EOF)
Copy link
Member

Choose a reason for hiding this comment

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

should rather be in the previous if clause (even though it kind of makes the loop condition useless, but still):

		if (c == '`' || c == EOF)
			break;

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you. Updated.

EOF char was mistakenly appended to a token of template string.

Close universal-ctags#1493.

Merging conditions is suggested by @b4n.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake masatake force-pushed the handle-eof-in-template-string-of-jscript branch from 004d0c5 to fe7e03a Compare August 27, 2017 23:59
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0005%) to 85.707% when pulling fe7e03a on masatake:handle-eof-in-template-string-of-jscript into 1c8b98d on universal-ctags:master.

Copy link
Member

@b4n b4n left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@masatake masatake closed this Aug 28, 2017
@masatake masatake reopened this Aug 28, 2017
@masatake masatake merged commit 058eb2c into universal-ctags:master Aug 28, 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.

3 participants