-
-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax: better column numbers for escapes inside backquotes
Backslashes inside backquote command substitutions are deduplicated, so they are not included in any literal values, but they still need to be counted for the sake of column numbers. With the input last=`echo \\$demo` we used to think that the literal with Go string value "\\$demo", deduplicated from the input "\\\\$demo", went from column 12 to 18. This can't be, since the input literal was seven bytes and not six, even if we end up parsing the literal as six bytes after deduplicating. We now correctly parse the column positions as 12 and 19. Fixes #1028.
- Loading branch information
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
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
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