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
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
01220cf3df
Remove support for $args and positional variables ($0, $1, $2, ...)
...
The semantics of signatureless lambdas has been changed to mean "no arguments
accepted" rather than "any arguments accepted".
This fixes #397 .
2017-08-05 21:50:13 +02:00
Qi Xiao
e99031f3e2
Use understore in filenames.
2017-06-26 19:47:10 +02:00
Qi Xiao
7da036e187
File renames, preferring dashes.
2017-02-03 20:53:22 -08:00
Qi Xiao
22562555ee
Find libraries in ~/.elvish/lib when use'ing.
2017-02-01 12:03:54 -08:00
Qi Xiao
ddbbfb9d33
Clean up exception representation.
...
Exceptions are now already represented by eval.Exception, which consist of an
error and a traceback. eval.Error is dropped.
2017-01-29 02:30:04 +00:00
Qi Xiao
a2fcfcfae3
Remove store.DataDir and store the data dir in Evaler.
2017-01-27 21:25:32 +00:00
Christian Muehlhaeuser
764c61e3c4
Background processes get their own pgid ( #309 )
2017-01-13 14:50:14 +00:00
Qi Xiao
d44b3154f7
Separate e: and E:.
...
This fixes #285 .
2016-10-18 22:17:15 +08:00
Qi Xiao
7054a4f0fe
Store a util.Traceback in util.PosError.
2016-10-13 23:03:17 +08:00
Qi Xiao
db1c12cb48
EvalCtx.context -> .name
2016-10-13 21:51:51 +08:00
Qi Xiao
7efd489df3
splice -> explode
...
The author just found out that he had a terrible misunderstanding of the
word "splice".
2016-10-13 14:12:14 +08:00
Qi Xiao
40dd2ec32a
Implement error traceback.
...
This fixes #207 .
2016-10-11 22:47:55 +08:00
Qi Xiao
c643b6d514
Display one traceback entry correctly.
...
The traceback displayed is the innermost frame.
2016-10-11 21:37:27 +08:00
Qi Xiao
a16d4e8766
Support multi-level module.
...
This fixes #249 .
2016-10-11 00:07:57 +08:00
Qi Xiao
8411fcfa29
In "use", make namespace before evaluating source.
...
This fixes #229 .
2016-10-09 22:52:02 +08:00
Qi Xiao
e42d700d39
Fix the completion for "$@".
2016-09-15 13:33:16 +02:00
Qi Xiao
6f7f13f1f0
Fix broken test.
2016-09-10 00:54:18 +02:00
Qi Xiao
c0a3ab9eee
Separate boolean return value and exception.
...
This fixes #189 .
2016-07-08 01:03:34 +02:00
Qi Xiao
eae9cf0704
Teach completers and stylists of external modules.
...
This fixes #110 .
2016-03-21 00:55:34 +01:00
Qi Xiao
a9d5672fad
Export eval.ParseVariable.
2016-03-21 00:35:21 +01:00
Qi Xiao
4c938c7393
Support positional variables like $0 and $-1.
...
This fixes #159 .
2016-03-10 20:42:32 +01:00
Qi Xiao
9f4a6413c1
Support variadic assignment.
...
This fixes #84 .
2016-02-26 01:10:16 +01:00
Qi Xiao
519760107f
eval: Fix go:generate line.
2016-02-22 00:06:25 +01:00
Qi Xiao
7839884b13
Autoload modules.
...
This fixes #135 .
2016-02-21 20:10:33 +01:00
Qi Xiao
169b9917e3
Refine evaler's error reporting.
2016-02-20 00:48:13 +01:00
Qi Xiao
2b1b57f0aa
Refine compiler's error reporting.
2016-02-19 21:16:23 +01:00
Qi Xiao
be3b938bcf
The compiler no longer takes name and source.
2016-02-19 17:33:55 +01:00
Qi Xiao
ecaf1b73f9
Fix loading of external modules.
2016-02-16 23:24:09 +01:00
Qi Xiao
c37a51c2ed
Implement the use
builtin.
...
This addresses #135 .
2016-02-16 23:15:12 +01:00
Qi Xiao
c19a48ea8a
Support defining recursive functions with fn.
2016-02-16 14:49:22 +01:00
Qi Xiao
34fddcd100
Expose editor builtins via a le
module.
2016-02-12 00:43:41 +01:00
Qi Xiao
ae041b7dbf
eval: evalCtx -> EvalCtx
2016-02-12 00:30:36 +01:00
Qi Xiao
6f5babd294
eval: More exports.
2016-02-08 20:30:00 +01:00
Qi Xiao
8125e2f9e6
golint fixes.
2016-02-07 23:23:16 +01:00
Qi Xiao
087bddcc31
Implement splicing with $@varname.
...
This fixes #81 .
2016-02-07 03:12:54 +01:00
Qi Xiao
6c73af7b47
eval: support setting list and map elements
2016-02-01 11:42:28 +01:00
Qi Xiao
bd6b7f47f0
eval: remove explicit Exitus from Call
2016-01-31 02:11:10 +01:00
Qi Xiao
8d8fdb94fc
eval: start the switch to using throw/catch for error handling
2016-01-31 02:00:31 +01:00
Qi Xiao
8860d1ef0e
eval: make Error a wrapper around error
2016-01-31 01:04:00 +01:00
Qi Xiao
82e027e435
Exitus -> Error
2016-01-30 17:11:43 +01:00
Qi Xiao
e795b6de40
eval: internalVariable -> ptrVariable
2016-01-29 13:59:00 +01:00
Qi Xiao
44695ad145
eval: expose most Value funcs
2016-01-29 13:55:14 +01:00
Qi Xiao
3b57424e6f
eval: expose Exitus
2016-01-29 03:51:47 +00:00
Qi Xiao
b0568168e8
exitus cleanup
2016-01-28 23:39:20 +01:00
Qi Xiao
8c849af711
prefix for functions is now "&".
2016-01-27 21:24:17 +00:00
Qi Xiao
76c1c97d46
expose eval.fnPrefix; update docstring for fn
2016-01-26 17:42:37 +01:00
Qi Xiao
743185f6f3
eval: make lexical scoping less broken
2016-01-25 23:53:17 +01:00