nushell/crates/nu-protocol/src/ast
Horasal 54394fe9af
Allow operator in constants (#10212)
This pr fixes https://github.com/nushell/nushell/issues/10200

# Description

Allow unary and binary operators in constants, e.g.

```bash
const a = 1 + 2
const b = [0, 1, 2, 3] ++ [4]
```

# User-Facing Changes

Now constants can contain operators.

# Tests + Formatting

- 🟢 `toolkit fmt`
- 🟢 `toolkit clippy`
- 🟢 `toolkit test`
- 🟢 `toolkit test stdlib`

# After Submitting

None

---------

Co-authored-by: Horasal <horsal@horsal.dev>
2023-09-05 16:35:58 +02:00
..
block.rs Input output checking (#9680) 2023-07-14 15:20:35 +12:00
call.rs revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00
cell_path.rs Optional members in cell paths: Attempt 2 (#8379) 2023-03-15 20:50:58 -07:00
expr.rs Add pattern matching (#8590) 2023-03-24 14:52:01 +13:00
expression.rs Add pattern matching (#8590) 2023-03-24 14:52:01 +13:00
import_pattern.rs Recursively export constants from modules (#10049) 2023-08-20 14:51:35 +02:00
match_pattern.rs add match guards (#9621) 2023-07-16 12:25:12 +12:00
mod.rs Add pattern matching (#8590) 2023-03-24 14:52:01 +13:00
operator.rs Allow operator in constants (#10212) 2023-09-05 16:35:58 +02:00
pipeline.rs Avoid blocking when o+e> redirects too much stderr message (#8784) 2023-05-17 17:47:03 -05:00