Kurtis Rader
9a576529a3
Replace ErrArgs with more specific errors
...
This also replaces the slightly awkward "arguments here" reason with
"argument count" as the "what" for a typical errs.ArityMismatch
exception. It also reformats most of the constructors so that the "what"
is on the same line. This makes `grep errs.ArityMismatch **.go` more
useful as a result.
2021-06-13 22:42:04 +01:00
Qi Xiao
c39d03e973
Support all number types in the order command.
...
This fixes #1309 .
2021-05-31 21:25:08 +01:00
Qi Xiao
91b6f6dd72
Use the integrated persistent package.
2021-05-03 22:17:46 +01:00
Qi Xiao
6052a4dc4a
Remove the "fix int" terminology; just call it "int".
2021-04-06 22:35:58 +01:00
Qi Xiao
e2c4030728
pkg/eval: Handle non-positive step and overflow in the range builtin.
2021-04-06 22:33:02 +01:00
Qi Xiao
5c643181a4
Cleanup, docs and tests.
2021-04-05 20:48:22 +01:00
Qi Xiao
da67ba8a4a
Use machine word (int) instead of int64 for fixnum.
2021-04-04 13:37:38 +01:00
Qi Xiao
4612b58759
Support exact integer and rational numbers.
2021-04-04 00:58:53 +01:00
Qi Xiao
196eea21d4
Change module import path to src.elv.sh
2021-01-27 01:30:25 +00:00
Qi Xiao
6419f4524a
Implement namespaces using slices instead of maps.
...
More related improvements and cleanups will be done in followup commits.
This fixes #1139 .
2020-12-25 17:46:46 +00:00
Shengjing Zhu
6c08de0ff3
Fix typos found by codespell
2020-10-10 22:47:50 +01:00
Scott Reeves
864097a4ce
Update elvdocs referencing deprecated splits
2020-10-10 22:44:00 +01:00
Qi Xiao
734eb955e2
pkg/eval: Use exported methods to access ports from builtin functions.
2020-10-10 22:28:13 +01:00
Qi Xiao
bb122024dd
pkg/eval: Move test framework into new evaltest package.
2020-09-03 06:51:21 +01:00
Qi Xiao
dca782d573
pkg/eval: Document and test the ns builtin.
...
Also return a structured error with errs.BadValue.
2020-08-16 22:01:03 +01:00
Qi Xiao
9b2b33b429
pkg/eval: Move elvdoc comments before the implementations.
2020-08-16 18:46:29 +01:00
Qi Xiao
bb24b63356
Remove builtin commands deprecated in v0.14.0.
2020-08-16 16:10:58 +01:00
Kurtis Rader
9858d5a545
Add missing deprecation text for explode
...
Also, fix trivial typo in a comment as reported at
https://goreportcard.com/report/github.com/elves/elvish
2020-07-21 22:51:53 +01:00
Qi Xiao
ff292d43ce
pkg/eval: Make the sorting of "order" always stable.
2020-05-25 21:50:09 +01:00
Qi Xiao
1cd192daaf
pkg/eval: Implement "order".
...
This fixes #651 .
2020-05-25 17:45:08 +01:00
Qi Xiao
05156ea239
Add make-map command.
...
This fixes #943 .
2020-05-05 23:23:23 +01:00
Qi Xiao
cf6e048e58
pkg/eval: Support eval-time deprecation warning.
...
This addresses #898 .
2020-04-26 01:13:05 +01:00
Kurtis Rader
094a03ac5b
Normalize count
implementation arity exception
...
Add some comments that clarify why the `count` implmentation does not
use the `Inputs` API. Change the mismatched arg count exception to match
that of the `Inputs` API. Add a couple more unit tests.
Resolves #966
2020-04-16 15:56:20 +01:00
Qi Xiao
887967a7bb
pkg/eval: Fix elvdoc for the "all" builtin.
2020-04-13 00:52:21 +01:00
Qi Xiao
41985123d3
Move all docs for builtins to the Go code.
2020-01-18 08:12:50 -05:00
Qi Xiao
feadbc2330
Introduce a new "one" builtin.
2020-01-17 09:00:23 -05:00
Qi Xiao
8a8db45230
pkg/eval: Make all
take an optional argument.
...
Also make `all` no longer preserve byte inputs but turn them into values.
2020-01-17 08:45:34 -05:00
Qi Xiao
e45fdf7228
Move all libraries to new pkg/.
2019-12-23 20:00:59 +00:00