forked from extern/nushell
Parse mid-line comments (#2800)
This commit is contained in:
parent
57a2d695e2
commit
8509873043
@ -280,10 +280,11 @@ pub fn bare(src: &mut Input, span_offset: usize) -> (Spanned<String>, Option<Par
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn skip_comment(input: &mut Input) {
|
fn skip_comment(input: &mut Input) {
|
||||||
for (_, c) in input {
|
while let Some((_, c)) = input.peek() {
|
||||||
if c == '\n' || c == '\r' {
|
if *c == '\n' || *c == '\r' {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
input.next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user