Qi Xiao
01d611aabd
Don't crash the compiler when redirection sign is invalid.
...
This fixes #484 .
2017-09-30 21:01:39 +08:00
Qi Xiao
d9dfd69788
eval: More tests against scan.go.
2017-09-29 23:13:19 +08:00
Qi Xiao
90e0cf4454
eval: More tests against scan.go.
2017-09-29 22:16:21 +08:00
Qi Xiao
41018bd1ab
util: Thrown.Error -> .Wrapped; implement Error()
2017-09-29 22:14:55 +08:00
Qi Xiao
df603b6856
eval: Add tests against scan.go.
2017-09-29 21:35:22 +08:00
Qi Xiao
f137524cad
More renamings.
2017-09-29 21:35:05 +08:00
Qi Xiao
51040541bb
eval: Renaming identifiers in scan.go.
2017-09-29 21:09:36 +08:00
Qi Xiao
e47612a13c
eval: Put Scan* in a separate scan.go.
2017-09-29 20:20:26 +08:00
Qi Xiao
bca09d0e0d
Revert "eval: Implement a short path for pipelines containing one form."
...
This reverts commit a691ee9112
.
For reason not understood, this optimization causes performance regression on
the following code:
for i [(range 1000)] {
for j [(range 1000)] {
}
}
2017-09-29 17:59:58 +08:00
Qi Xiao
7a3b5c688a
Fix build.
...
This fixes #491 .
2017-09-27 02:00:12 +02:00
Qi Xiao
e722800f44
Remove more uses of fmt.Sprintf
2017-09-22 22:06:27 +01:00
Qi Xiao
aa41c5dda5
Don't use Sprintf for EvalCtx name when executing pipeline.
2017-09-22 01:51:03 +01:00
Qi Xiao
a691ee9112
eval: Implement a short path for pipelines containing one form.
...
The run time of the following code has been reduced from 900ms to 550ms on my
local computer:
range 100000 | each [_]{ nop }
2017-09-22 01:27:28 +01:00
Qi Xiao
040e248939
Fix pkgindex URL in epm.elv.
2017-09-21 20:05:47 +01:00
Qi Xiao
f4878bbfb7
Bundle epm, Elvish package manager.
2017-09-21 02:11:36 +01:00
Qi Xiao
6de8c45c57
Embedded modules -> bundled modules.
2017-09-21 02:10:09 +01:00
Qi Xiao
7863d69683
Enable importing the same module under different names.
2017-09-21 01:52:16 +01:00
Qi Xiao
e24ee44162
Support relative uses.
2017-09-21 00:37:17 +01:00
Qi Xiao
151da537f6
Module uses are now lexically scoped.
2017-09-21 00:10:21 +01:00
Qi Xiao
021f27ab53
Add a "uses" component to staticScope as well.
2017-09-20 22:50:43 +01:00
Qi Xiao
049b87a139
Make "builtin" a scope, not just a namespace.
2017-09-20 13:48:28 +01:00
Qi Xiao
357a6d91e2
Introduce a module map as part of the lexical scope.
...
This commit only deals with the type change, but doesn't actually use the
module map.
2017-09-20 13:43:28 +01:00
Qi Xiao
ae3f6279af
Change the syntax of "use".
...
Previsouly, use accepts a module name a🅱️ x:y, and imports the file
a/b/x/y.elv (under ~/.elvish/lib) as a🅱️ x:y. This makes it clumsy to import
modules in deeply nested directories, because the resulting module name is
very long.
Now it is possible to omit some leading path components in the module name by
specifying them using slashes instead of colons. For example, "use a/b/c/x:y"
imports the same file a/b/c/x/y.elv, but as x:y. In other words, the part
before the last slash is used to derive the filename, but not used in the
module name.
The "use" special form used to accept a second argument for an alternative
filename. That argument has been removed to standardize the way the module
file is found. Relavite imports will be introduced some time in future to
compensate some of the lost functionality.
2017-09-20 11:46:35 +01:00
Qi Xiao
9d07cd9eb4
Add -is-dir.
2017-09-19 00:42:38 +01:00
Qi Xiao
e7a8b96d7d
Fix readline-binding.
2017-09-17 23:08:15 +01:00
Qi Xiao
85479b09e6
Add tests for the "assoc" builtin.
2017-09-16 17:50:53 +01:00
Qi Xiao
d1b75c7097
Add a "dissoc" builtin.
2017-09-16 17:48:53 +01:00
Qi Xiao
fbdf5427f9
Add builtin for getting name of current source.
...
This addresses #327 .
2017-09-16 17:15:38 +01:00
Qi Xiao
0d51f22cc9
eval: Use Unwrapper in more places.
2017-09-05 00:15:06 +01:00
Qi Xiao
fad0486457
eval: Replace "muster" with "unwrapper".
2017-09-05 01:05:44 +02:00
Qi Xiao
6d56d74696
Test temp assignment of list/map elements.
2017-09-01 01:24:09 +02:00
Qi Xiao
5125ee0dd1
Reimplement element assignment using Assoc.
...
This resolves #392 and #422 .
2017-09-01 01:07:37 +02:00
Qi Xiao
10633878ad
EnvPathList -> EnvList; simplify implementation.
2017-09-01 01:07:35 +02:00
Qi Xiao
015cfc98a4
eval: Use a more efficient implementation for Struct.
2017-09-01 01:07:35 +02:00
Qi Xiao
aa2f8a54ee
Implement Assoc for several types.
2017-09-01 01:07:34 +02:00
Qi Xiao
6cfca909ec
Use persistent hashmap to implement map.
...
This resolves #414 .
2017-09-01 01:07:20 +02:00
Qi Xiao
4f884b6dbf
Add Hash to Value interface.
2017-08-30 20:52:27 +02:00
Qi Xiao
f1b9fb0b45
Eq -> Equal.
2017-08-30 19:47:50 +02:00
Qi Xiao
3c8b78e43b
eval: Improve readability of eval_test.go.
2017-08-14 23:57:36 +01:00
Qi Xiao
b2ce7b29e5
Add a "drop" builtin.
2017-08-14 23:33:31 +01:00
Diego Zamboni
e4ae5bbd5d
Updates and fixes to narrow.elv ( #465 )
...
* Updates and fixes to narrow.elv
- Updated to account for recent syntax fixes.
- Added hook capabilities to all three modes, documented in narrow.elv
- Updated embedded module.
- Added bind_keys function to set key bindings
* Addressed style comments and use not-eq
* Updated embedded module
2017-08-13 22:23:33 +01:00
Qi Xiao
fc3ef31eb8
No backquotes for output capture anymore.
2017-08-13 18:41:33 +01:00
Qi Xiao
4159d2d048
Add a "not-eq" builtin.
2017-08-13 00:44:21 +01:00
Qi Xiao
5e5135fb76
Use eval.PCaptureOutputInner to capture arg completer output.
2017-08-13 00:27:04 +01:00
Qi Xiao
cd58ed6be6
Implement output capture with a more flexible inner function.
2017-08-13 00:18:06 +01:00
Qi Xiao
3168afdaa0
eval: Add benchmarks for output capture.
2017-08-13 00:17:41 +01:00
Qi Xiao
e3d93b72de
Change signature of splits to match re:split.
2017-08-05 22:51:16 +02:00
Qi Xiao
0effe54af0
Change the argument order of the replaces builtin to match re:replace.
2017-08-05 22:49:31 +02:00
Qi Xiao
2d6bd1f7d1
Compile and evaluate options in lambda signature.
...
This fixes #82 .
2017-08-05 22:29:17 +02:00
Qi Xiao
a48df99361
Parse options in lambda signature.
2017-08-05 21:50:44 +02:00