Commit Graph

775 Commits

Author SHA1 Message Date
Devyn Cairns
4cf6bd6fb0 fix overlay by handling keyword expression as just the inner expression 2024-07-05 05:41:08 -07:00
Devyn Cairns
250bcd3bc2 only limit callee stacks 2024-07-05 05:31:16 -07:00
Devyn Cairns
6e6cd00512 add recursion limit to ir eval 2024-07-05 05:24:08 -07:00
Devyn Cairns
4b56fba7d6 add datetime expression, remove todo compileerror 2024-07-05 05:17:49 -07:00
Devyn Cairns
c7a86cf75e make timeit and metadata work through hack that's ok for now 2024-07-05 05:08:52 -07:00
Devyn Cairns
2590f609ce
try to handle unknown args 2024-07-04 17:18:42 -07:00
Devyn Cairns
c92de3a242
redirect_env 2024-07-04 17:16:58 -07:00
Devyn Cairns
49f93470a1
reuse RegisterBufCache? 2024-07-04 17:05:27 -07:00
Devyn Cairns
4ff41e5817 micro-optimizing a bit 2024-07-04 04:17:44 -07:00
Devyn Cairns
6398f0e31e
literal ValueWithUnit (filesize, duration) 2024-07-04 00:48:23 -07:00
Devyn Cairns
c06ec8afee
fix --help, alias 2024-07-03 22:09:46 -07:00
Devyn Cairns
5c419a39e8
custom commands, fix let, fix bare $env var 2024-07-03 20:15:00 -07:00
Devyn Cairns
d33d21e1dc
row condition, fix table literal 2024-07-03 17:51:20 -07:00
Devyn Cairns
062821039a
match support 2024-07-03 17:36:26 -07:00
Devyn Cairns
3bdb864b9d
clean up unexpected 2024-07-03 15:25:15 -07:00
Devyn Cairns
1294d0f710
remove unused import 2024-07-03 14:41:36 -07:00
Devyn Cairns
ae0651127d
string interpolation: don't trust type checking, only start from strings if they're literals 2024-07-03 00:18:32 -07:00
Devyn Cairns
52ec0c3b1d
fix parser info: actually add it to the call 2024-07-03 00:17:09 -07:00
Devyn Cairns
3c33a3f4eb
try/catch with catch as an expression rather than literal block 2024-07-03 00:04:46 -07:00
Devyn Cairns
7a055563a9
try/catch (wip) 2024-07-02 20:11:11 -07:00
Devyn Cairns
b3b59c8f9c
more keyword pseudocode 2024-07-02 18:39:59 -07:00
Devyn Cairns
9b88b4eca6
while, loop keywords + fix some allocation state issues 2024-07-02 18:35:04 -07:00
Devyn Cairns
4af1b1981d
fix binary op reg allocation bug 2024-07-01 14:10:00 -07:00
Devyn Cairns
89d7b2237c
redirect test 2024-07-01 13:47:11 -07:00
Devyn Cairns
e2510d6c0d
fix redirection, more tests 2024-07-01 13:23:49 -07:00
Devyn Cairns
dca2798d4d
support parser info 2024-07-01 03:07:23 -07:00
Devyn Cairns
67bd88535c
WIP: cleaning up errors 2024-06-28 23:19:37 -07:00
Devyn Cairns
9227e28485
const 2024-06-28 22:11:35 -07:00
Devyn Cairns
b63b0217bd
string, glob interpolation 2024-06-28 22:07:39 -07:00
Devyn Cairns
37255bef3c
implement for keyword, add iterate instruction 2024-06-28 21:03:57 -07:00
Devyn Cairns
ae21929915
add return keyword 2024-06-28 19:36:01 -07:00
Devyn Cairns
ceb34c099b
refactor compile into multiple files 2024-06-28 19:18:12 -07:00
Devyn Cairns
a6c2d39879
change the span of the if jump to the else 2024-06-27 19:58:17 -07:00
Devyn Cairns
9e19f15cb5
try to reduce drops a bit 2024-06-27 00:24:29 -07:00
Devyn Cairns
13e348ab57
let, mut, and assignments 2024-06-27 00:09:33 -07:00
Devyn Cairns
866d5c405f
support external calls 2024-06-26 19:47:47 -07:00
Devyn Cairns
2202118efb
range support 2024-06-26 19:15:44 -07:00
Devyn Cairns
69b2d00756
Support if/else, clear up drop/empty reg semantics 2024-06-26 18:47:08 -07:00
Devyn Cairns
fd0b99554d
Add transitive use_ir field to Stack and add --use-ir option to nu 2024-06-26 17:28:00 -07:00
Devyn Cairns
73b092bfdc
instructions: list-spread, record-spread 2024-06-26 16:56:09 -07:00
Devyn Cairns
ed59f80b35
list, record, table expression support 2024-06-26 02:10:00 -07:00
Devyn Cairns
7890b3f27a
more efficient storage for string data in ir blocks 2024-06-26 01:23:46 -07:00
Devyn Cairns
4fe74e3f8c
Merge branch 'main' into ir 2024-06-25 22:44:50 -07:00
Jack Wright
0dd35cddcd
Bumping version to 0.95.1 (#13231)
Marks development for hotfix
2024-06-25 18:26:07 -07:00
Jakub Žádník
f93c6680bd
Bump to 0.95.0 (#13221)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
<!--
Thank you for improving Nushell. Please, check our [contributing
guide](../CONTRIBUTING.md) and talk to the core team before making major
changes.

Description of your pull request goes here. **Provide examples and/or
screenshots** if your changes affect the user experience.
-->

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use toolkit.nu; toolkit test stdlib"` to run the
tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# 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.
-->
2024-06-25 21:29:47 +03:00
Devyn Cairns
0459b74613 knocking off some TODOs, closures work now 2024-06-22 16:18:30 -07:00
NotTheDr01ds
44aa0a2de4
Table help rendering (#13182)
# Description

Mostly fixes #13149 with much of the credit to @fdncred.

This PR runs `table --expand` against `help` example results. This is
essentially the same fix that #13146 was for `std help`.

It also changes the shape of the result for the `table --expand`
example, as it was hardcoded wrong.

~Still needed is a fix for the `table --collapse` example.~ Note that
this is also still a bug in `std help` that I didn't noticed before.

# User-Facing Changes

Certain tables are now rendered correctly in the help examples for:

* `table`
* `zip`
* `flatten`
* And almost certainly others

# Tests + Formatting

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

# After Submitting

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2024-06-19 20:12:25 -05:00
Devyn Cairns
037ea618c7 give ICE a proper error type 2024-06-18 22:21:59 -07:00
Devyn Cairns
3c4877b059 it does calls!!! 2024-06-18 22:16:21 -07:00
Devyn Cairns
b0d24ea434 omg it compiles 2024-06-18 21:39:42 -07:00