Closed
Conversation
…tion call) Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> Agent-Logs-Url: https://github.com/kovidgoyal/rapydscript-ng/sessions/16352b51-7b36-420c-8403-86708c1353bc
Copilot created this pull request from a session on behalf of
kovidgoyal
March 23, 2026 03:28
View session
Owner
|
@copilot remove the package.lock file from your pull request |
Co-authored-by: kovidgoyal <1308621+kovidgoyal@users.noreply.github.com> Agent-Logs-Url: https://github.com/kovidgoyal/rapydscript-ng/sessions/ecc2e485-9e2b-48f1-a5a4-01b50caf32dd
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consecutive f-strings like
f'a'f'b'were compiled to"a"("b")— a JS function call — instead of"a" + "b". Plain string concatenation ('a''b') worked correctly.Root cause:
handle_interpolated_stringinserts the interpolated result as(expr)into the source buffer and returns a(punc token. A following f-string's(was then treated by the parser as a call expression on the preceding result.Fix (
src/tokenizer.pyj):handle_interpolated_stringnow greedily consumes any immediately following string literals (plain strings or f-strings with any modifier) and merges them into a single combined expression before inserting into the source buffer.v'...') are intentionally excluded from lookahead concatenation.quoted_stringfromstring_interpolationto properly escape plain string values in the combined expression.Tests (
test/str.pyj): Added cases covering f+f, f+plain, interpolated+f, and interpolated+plain combinations.