nushell/crates/nu-protocol/src/errors
Wind 57452337ff
Restrict strings beginning with quote should also ending with quote (#13131)
# Description
Closes: #13010

It adds an additional check inside `parse_string`, and returns
`unbalanced quote` if input string is unbalanced

# User-Facing Changes
After this pr, the following is no longer allowed:
```nushell
❯ "asdfasdf"asdfasdf
Error: nu::parser::extra_token_after_closing_delimiter

  × Invaild characters after closing delimiter
   ╭─[entry #1:1:11]
 1 │ "asdfasdf"asdfasdf
   ·           ────┬───
   ·               ╰── invalid characters
   ╰────
  help: Try removing them.
❯ 'asdfasd'adsfadf
Error: nu::parser::extra_token_after_closing_delimiter

  × Invaild characters after closing delimiter
   ╭─[entry #2:1:10]
 1 │ 'asdfasd'adsfadf
   ·          ───┬───
   ·             ╰── invalid characters
   ╰────
  help: Try removing them.
```

# Tests + Formatting
Added 1 test
2024-06-28 09:47:12 +08:00
..
cli_error.rs Refactor the CLI code a bit (#12782) 2024-05-10 07:29:27 +08:00
labeled_error.rs bump rust-toolchain to 1.75.0 (#12258) 2024-03-21 13:23:39 -05:00
mod.rs Better generic errors for plugins (and perhaps scripts) (#12236) 2024-03-21 12:27:21 +01:00
parse_error.rs Restrict strings beginning with quote should also ending with quote (#13131) 2024-06-28 09:47:12 +08:00
parse_warning.rs Deprecate --numbered from for (#13112) 2024-06-10 03:01:22 +00:00
shell_error.rs Add derive macros for FromValue and IntoValue to ease the use of Values in Rust code (#13031) 2024-06-17 16:05:11 -07:00