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

Correct RANGE in template string when dealing with quotes in annotations #975

Conversation

iObject
Copy link
Collaborator

@iObject iObject commented Dec 4, 2023

Fixes a bug where " characters in template strings would mistakenly increment the line number of future tokens, causing incorrect token positions for the remainder of the file. This didn't cause problems with the transpiled code, but makes for a very poor debugging (sourcemap) and editing (diagnostic position) experience.

Before the fix:
template-string-position-fix

After the fix:
template-string-position-fix-fixed

Copy link
Member

@TwitchBronBron TwitchBronBron left a comment

Choose a reason for hiding this comment

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

Great find!

@TwitchBronBron TwitchBronBron added the create-package create a temporary npm package on every commit label Dec 4, 2023
@rokucommunity-bot
Copy link

Hey there! I just built a new temporary npm package based on 8665a0f. You can download it here or install it by running the following command:

npm install https://github.com/rokucommunity/brighterscript/releases/download/v0.0.0-packages/brighterscript-0.65.11-Correct-RANGE-in-template-string-when-dealing-with-quotes-in-annotations.20231204143556.tgz

@TwitchBronBron TwitchBronBron merged commit cbc8eec into master Dec 4, 2023
6 checks passed
@TwitchBronBron TwitchBronBron deleted the Correct-RANGE-in-template-string-when-dealing-with-quotes-in-annotations branch December 4, 2023 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-package create a temporary npm package on every commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants