mirror of
https://github.com/nushell/nushell.git
synced 2025-08-11 05:44:22 +02:00
fix(parser): comments in subexpressions of let
/mut
(#15375)
Closes #15305 # Description Basically turns off `skip_comments` of the lex function for right hand side expressions of `let`/`mut`, just as in `parse_const`. # User-Facing Changes Should be none. # Tests + Formatting +1 # After Submitting
This commit is contained in:
@ -3331,7 +3331,7 @@ pub fn parse_let(working_set: &mut StateWorkingSet, spans: &[Span]) -> Pipeline
|
||||
spans[span.0 + 1].start,
|
||||
&[],
|
||||
&[],
|
||||
true,
|
||||
false,
|
||||
);
|
||||
|
||||
if let Some(parse_error) = parse_error {
|
||||
@ -3613,7 +3613,7 @@ pub fn parse_mut(working_set: &mut StateWorkingSet, spans: &[Span]) -> Pipeline
|
||||
spans[span.0 + 1].start,
|
||||
&[],
|
||||
&[],
|
||||
true,
|
||||
false,
|
||||
);
|
||||
|
||||
if let Some(parse_error) = parse_error {
|
||||
|
@ -5208,7 +5208,7 @@ pub fn parse_assignment_expression(
|
||||
rhs_span.start,
|
||||
&[],
|
||||
&[],
|
||||
true,
|
||||
false,
|
||||
);
|
||||
working_set.parse_errors.extend(rhs_error);
|
||||
|
||||
|
Reference in New Issue
Block a user