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
c3712f4337
more tests
2024-07-04 00:48:29 -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
37a3b19cc5
constant test
2024-07-01 14:12:32 -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
206d6c279d
wip eval tests
2024-07-01 04:02:11 -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
b02d6e44fc
include the formatted instructions in view ir --json, since that's hard to generate from a plugin
2024-06-27 19:21:54 -07:00
Devyn Cairns
0d15d50023
fix deserialization of IrBlock
2024-06-27 18:09:22 -07:00
Devyn Cairns
06b7e5c30a
add view ir --json for use in external tooling
2024-06-27 17:31:59 -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
c5a00ca3f1
update lock via cargo check to fix ci ( #13233 )
2024-06-25 19:14:15 -07:00
Ian Manske
5a486029db
Add typed path forms ( #13115 )
...
# Description
This PR adds new types to `nu-path` to enforce path invariants. Namely,
this PR adds:
- `Path` and `PathBuf`. These types are different from, but analogous to
`std::path::Path` and `std::path::PathBuf`.
- `RelativePath` and `RelativePathBuf`. These types must be/contain
strictly relative paths.
- `AbsolutePath` and `AbsolutePathBuf`. These types must be/contain
strictly absolute paths.
- `CanonicalPath` and `CanonicalPathBuf`. These types must be/contain
canonical paths.
Operations are prohibited as necessary to ensure that the invariants of
each type are upheld (needs double-checking).
Only paths that are absolute (or canonical) can be easily used as /
converted to `std::path::Path`s. This is to help force us to account for
the emulated current working directory instead of accidentally using the
current directory of the Nushell process (i.e.,
`std::env::current_dir`). Related to #12975 and #12976 .
Note that this PR uses several declarative macros, as the file / this PR
would otherwise be 5000 lines long.
# User-Facing Changes
No major changes yet, just adds types to `nu-path` to be used in the
future.
# After Submitting
Actually use the new path types in all our crates where it makes sense,
removing usages of `std::path` types.
2024-06-25 18:33:57 -07:00