mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 18:03:51 +01:00
Add support for crlf for line continuations (#341)
This commit is contained in:
parent
e324c1a078
commit
42367ddf6d
1
TODO.md
1
TODO.md
@ -37,6 +37,7 @@
|
||||
- [x] Support for `$in`
|
||||
- [x] config system
|
||||
- [ ] shells
|
||||
- [ ] autoenv
|
||||
- [ ] plugins
|
||||
- [ ] dataframes
|
||||
- [ ] port over `which` logic
|
||||
|
@ -1310,7 +1310,7 @@ pub fn parse_full_cell_path(
|
||||
let source = working_set.get_span_contents(span);
|
||||
let mut error = None;
|
||||
|
||||
let (tokens, err) = lex(source, span.start, &[b'\n'], &[b'.']);
|
||||
let (tokens, err) = lex(source, span.start, &[b'\n', b'\r'], &[b'.']);
|
||||
error = error.or(err);
|
||||
|
||||
let mut tokens = tokens.into_iter().peekable();
|
||||
@ -1335,7 +1335,7 @@ pub fn parse_full_cell_path(
|
||||
|
||||
let source = working_set.get_span_contents(span);
|
||||
|
||||
let (output, err) = lex(source, span.start, &[b'\n'], &[]);
|
||||
let (output, err) = lex(source, span.start, &[b'\n', b'\r'], &[]);
|
||||
error = error.or(err);
|
||||
|
||||
let (output, err) = lite_parse(&output);
|
||||
@ -2035,7 +2035,7 @@ pub fn parse_signature_helper(
|
||||
let mut error = None;
|
||||
let source = working_set.get_span_contents(span);
|
||||
|
||||
let (output, err) = lex(source, span.start, &[b'\n', b','], &[b':']);
|
||||
let (output, err) = lex(source, span.start, &[b'\n', b'\r', b','], &[b':']);
|
||||
error = error.or(err);
|
||||
|
||||
let mut args: Vec<Arg> = vec![];
|
||||
@ -2364,7 +2364,7 @@ pub fn parse_list_expression(
|
||||
let span = Span { start, end };
|
||||
let source = working_set.get_span_contents(span);
|
||||
|
||||
let (output, err) = lex(source, span.start, &[b'\n', b','], &[]);
|
||||
let (output, err) = lex(source, span.start, &[b'\n', b'\r', b','], &[]);
|
||||
error = error.or(err);
|
||||
|
||||
let (output, err) = lite_parse(&output);
|
||||
@ -2436,7 +2436,7 @@ pub fn parse_table_expression(
|
||||
|
||||
let source = working_set.get_span_contents(span);
|
||||
|
||||
let (output, err) = lex(source, start, &[b'\n', b','], &[]);
|
||||
let (output, err) = lex(source, start, &[b'\n', b'\r', b','], &[]);
|
||||
error = error.or(err);
|
||||
|
||||
let (output, err) = lite_parse(&output);
|
||||
@ -2770,7 +2770,7 @@ pub fn parse_value(
|
||||
let source = working_set.get_span_contents(span);
|
||||
let mut error = None;
|
||||
|
||||
let (tokens, err) = lex(source, span.start, &[b'\n'], &[b'.']);
|
||||
let (tokens, err) = lex(source, span.start, &[b'\n', b'\r'], &[b'.']);
|
||||
error = error.or(err);
|
||||
|
||||
let tokens = tokens.into_iter().peekable();
|
||||
@ -3205,7 +3205,7 @@ pub fn parse_record(
|
||||
let span = Span { start, end };
|
||||
let source = working_set.get_span_contents(span);
|
||||
|
||||
let (tokens, err) = lex(source, start, &[b'\n', b','], &[b':']);
|
||||
let (tokens, err) = lex(source, start, &[b'\n', b'\r', b','], &[b':']);
|
||||
error = error.or(err);
|
||||
|
||||
let mut output = vec![];
|
||||
|
Loading…
Reference in New Issue
Block a user