mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
fix(parser): span of keyword expression (#14928)
# Description This PR fixes #14816 , so that expression-contains-position check won't need special treatment for keyword expressions. e.g. ```nushell overlay use foo as bar # |_______ cursor here if true { } else { } # |_______ here ``` as mentioned in #14924 # User-Facing Changes # Tests + Formatting # After Submitting
This commit is contained in:
@ -919,7 +919,7 @@ pub fn parse_multispan_value(
|
||||
Expression::new(
|
||||
working_set,
|
||||
Expr::Keyword(Box::new(keyword.clone())),
|
||||
arg_span,
|
||||
keyword.span.merge(keyword.expr.span),
|
||||
keyword.expr.ty,
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user