Commit Graph

67 Commits

Author SHA1 Message Date
Qi Xiao
cf6e048e58 pkg/eval: Support eval-time deprecation warning.
This addresses #898.
2020-04-26 01:13:05 +01:00
Qi Xiao
88122a019e pkg: Simplify some APIs by using parse.Tree. 2020-04-25 19:36:35 +01:00
Qi Xiao
20979b44a2 pkg/parse: Use Source values, not pointers.
The Source type is small enough that using values is likely more efficient.
2020-04-25 19:22:38 +01:00
Qi Xiao
13f7b29707 pkg/parse: Add a new Parse function and a Tree type.
This replaces the AsChunk function. All current users of parse.AsChunk has been
changed to use parse.Parse instead.
2020-04-25 19:16:22 +01:00
Qi Xiao
b8505c7065 pkg/eval/source.go -> pkg/parse/source.go. 2020-04-25 18:26:17 +01:00
Qi Xiao
53a1eca9af pkg/eval: Remove New*Source functions.
All call sites of such functions are replaced with simple &Source{...}
expressions.
2020-04-25 13:22:07 +01:00
Qi Xiao
0c50e93ebd pkg/eval: Remove (*Evaler).EvalInTTY.
This is so that pkg/program/shell can get rid of the dependency on the standard
streams and can dependency-inject the files.
2020-04-16 00:11:23 +01:00
Qi Xiao
8292a5b166 pkg/eval: Remove Evaler.EvalSourceInTTY. 2020-04-15 00:04:23 +01:00
Qi Xiao
d77ad829b6 pkg/eval: Add Evaler.ParseAndCompile.
Also require a name argument in NewInteractiveSource.
2020-04-14 23:54:45 +01:00
Qi Xiao
af6b523e02 pkg/eval: Remove Frame.{eval,Call}. 2020-04-09 21:01:14 +01:00
Qi Xiao
bcd1c1df6f pkg/eval: Move intCh from Evaler to Frame.
This avoids a race condition when using EvalInTTY concurrently.

This addresses #73.
2020-03-28 23:56:47 +00:00
Qi Xiao
41985123d3 Move all docs for builtins to the Go code. 2020-01-18 08:12:50 -05:00
Qi Xiao
b3a48ed510 pkg/eval: Revamp Source. 2020-01-11 03:01:30 +00:00
Qi Xiao
433b5f2d96 pkg/eval: Lift the restriction of relative "use" from scripts. 2020-01-11 02:27:43 +00:00
Qi Xiao
10b4baf89c pkg/eval: NewInternalSource -> NewInternalGoSource. 2020-01-05 14:07:03 +00:00
Qi Xiao
012b779ca7 pkg/daemon: Make Client an interface. 2019-12-26 17:23:18 +00:00
Qi Xiao
e45fdf7228 Move all libraries to new pkg/. 2019-12-23 20:00:59 +00:00