nushell/crates/nu-engine/src
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
..
call_ext.rs Allow parse-time evaluation of calls, pipelines and subexpressions (#9499) 2023-08-26 16:41:29 +03:00
column.rs Create Record type (#10103) 2023-08-25 07:50:29 +12:00
documentation.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
env.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
eval.rs Allow operator in constants (#10212) 2023-09-05 16:35:58 +02:00
glob_from.rs treat path contains '?' as pattern (#10142) 2023-09-03 19:25:00 -05:00
lib.rs Allow operator in constants (#10212) 2023-09-05 16:35:58 +02:00
scope.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00