-
Notifications
You must be signed in to change notification settings - Fork 620
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
JavaScript: don't make EOF be a part of template string #1530
Conversation
There was a problem hiding this 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.
parsers/jscript.c
Outdated
@@ -511,11 +511,15 @@ static void parseTemplateString (vString *const string) | |||
c = getcFromInputFile (); | |||
if (c == '`') | |||
break; | |||
vStringPut (string, c); | |||
|
|||
if (c != EOF) |
There was a problem hiding this comment.
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;
There was a problem hiding this comment.
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>
004d0c5
to
fe7e03a
Compare
There was a problem hiding this 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 👍
EOF char was mistakenly appended to a token of template string.
Close #1493.
Signed-off-by: Masatake YAMATO yamato@redhat.com