Commit Graph

16 Commits

Author SHA1 Message Date
Yehuda Katz
ab915f1c44 Revert "Revert "Migrate most uses of the Span concept to Tag""
This reverts commit bee7c5639c.
2019-09-14 11:30:24 -05:00
Maximilian Roos
127381497c
run rustfmt 2019-09-11 10:36:50 -04:00
Yehuda Katz
8a29c9e6ab Migrated numerics to BigInt/BigDecimal
This commit migrates Value's numeric types to BigInt and BigDecimal. The
basic idea is that overflow errors aren't great in a shell environment,
and not really necessary.

The main immediate consequence is that new errors can occur when
serializing Nu values to other formats. You can see this in changes to
the various serialization formats (JSON, TOML, etc.). There's a new
`CoerceInto` trait that uses the `ToPrimitive` trait from `num_traits`
to attempt to coerce a `BigNum` or `BigDecimal` into a target type, and
produces a `RangeError` (kind of `ShellError`) if the coercion fails.

Another possible future consequence is that certain performance-critical
numeric operations might be too slow. If that happens, we can introduce
specialized numeric types to help improve the performance of those
situations, based on the real-world experience.
2019-09-01 21:00:30 -07:00
Andrés N. Robalino
ca0c6eaf58 This commit introduces a basic help feature. We can go to it
with the `help` command to explore and list all commands available.

Enter will also try to see if the location to be entered is an existing
Nu command, if it is it will let you inspect the command under `help`.

This provides baseline needed so we can iterate on it.
2019-08-31 19:06:11 -05:00
Odin Dutton
d71206ed9e Implement WholeStreamCommand for all remaining commands 2019-08-19 15:16:39 +10:00
Jonathan Turner
14e47f3d2c Add nth command 2019-08-12 17:13:58 +12:00
Jonathan Turner
aadacc2d36 Merge master 2019-08-09 16:51:21 +12:00
Jonathan Turner
99671b8ffc Move more parts to tags and away from spans 2019-08-05 20:54:29 +12:00
Jonathan Turner
462f783fac initial change to Tagged<Value> 2019-08-01 13:58:42 +12:00
Yehuda Katz
5a8e041a48 Tests pass! 2019-07-23 15:22:11 -07:00
Jonathan Turner
15507f00fc Introduce CallInfo, which abstracts args, name_span, and source_map 2019-07-20 14:27:10 +12:00
Yehuda Katz
34033afce4 WIP improve error infrastructure
Also simplify commands and reduce papercuts
2019-07-12 19:20:26 -07:00
Jonathan Turner
9ae9beb94a WIP 2019-06-22 15:43:37 +12:00
Jonathan Turner
54be5bf16e Update errors and improve ctrl-c 2019-06-16 06:36:17 +12:00
Jonathan Turner
e94d1d2758 Add pretty errors to commands 2019-06-08 10:35:07 +12:00
Jonathan Turner
90d0182a54 Rename to first and pick 2019-06-03 06:53:30 +12:00