1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:58:12 +00:00

Shell: Use the correct range for named variable expansions

Previously we were starting the variable expansions before the starting
'$' and calculating the wrong length, this commit makes it so we
calculate the right range for them.
This commit is contained in:
Ali Mohammad Pur 2023-04-18 16:46:25 +03:30 committed by Ali Mohammad Pur
parent 79c76d67ce
commit 93413f8682
2 changed files with 12 additions and 12 deletions

View file

@ -417,7 +417,7 @@ Vector<Token> Parser::perform_expansions(Vector<Token> tokens)
}
return ResolvedParameterExpansion {
.parameter = {},
.parameter = String::from_code_point(text[0]),
.argument = {},
.range = expansion.range,
.op = op,