forked from jashkenas/coffeescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly set location for string tokens ending in a newline
Fixes decaffeinate/decaffeinate#457 The existing logic for computing the end location of a string was to take the end of the string contents, then add the delimiter length to last_column. For example, `"""abc"""` would have an end position three characters after the `c`. However, if a string ended in a newline, then the end location for the string contents would be one line above the end location for the string, so the proper fix is to move the end location to the next line, not just to shift it to the right. This avoids a bug where the location data would sometimes reference a non-existent location (one past the end of its line), which would confuse decaffeinate-parser.
- Loading branch information
1 parent
f9a8f54
commit b60b9ed
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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