nushell/crates/nu-parser/src
Bob Hyman e616b2e247
Support extended unicode escapes in strings: "\u{10fff}" (#7883)
# Description

Support extended unicode escapes in strings with same syntax as Rust:
`"\u{6e}"`.

# User-Facing Changes

New syntax in string literals, `\u{NNNNNN}`, to go along with the
existing `\uNNNN`.
New syntax accepts 1-6 hex digits and rejects values greater than
0x10FFFF (max Unicode char)..

_(List of all changes that impact the user experience here. This helps
us keep track of breaking changes.)_

Won't break existing scripts, since this is new syntax.  

We might consider deprecating `char -u`, since users can now embed
unicode chars > 0xFFFF with the new escape.

# Tests + Formatting

Several unit tests and one integration test added.

- [x] `cargo fmt --all -- --check` to check standard code formatting
(`cargo fmt --all` applies these changes)
Done
- [x] `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect` to check that you're using the standard code
style
Done
- [x] `cargo test --workspace` to check that all tests pass  
Done

# After Submitting

- [ ] If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
2023-01-29 09:25:53 +13:00
..
deparse.rs fix arg parse (#5754) 2022-06-11 20:52:31 +12:00
errors.rs Incorrect parsing of unbalanced braces based on issue 6914 (#7621) 2023-01-24 10:05:46 +02:00
eval.rs Make get hole errors and cell path hole errors identical (improvement on #7002) (#7647) 2023-01-02 14:45:43 -08:00
flatten.rs Support redirect err and out to different streams (#7685) 2023-01-12 10:22:30 +01:00
known_external.rs Fix command name lookup for known externals (#7830) 2023-01-22 21:40:18 +02:00
lex.rs Incorrect parsing of unbalanced braces based on issue 6914 (#7621) 2023-01-24 10:05:46 +02:00
lib.rs Small parser refactors (#7568) 2022-12-22 13:41:44 +02:00
lite_parser.rs Fix multi-line redirection inside a block (#7808) 2023-01-23 06:32:56 +13:00
parse_keywords.rs Allow main command to define top-level module command (#7764) 2023-01-22 21:34:15 +02:00
parser.rs Support extended unicode escapes in strings: "\u{10fff}" (#7883) 2023-01-29 09:25:53 +13:00
type_check.rs allow tables in ++ operator (#7051) 2022-12-01 00:21:59 +01:00