Qi Xiao
e2f08af91b
Change slice syntax to use .. instead of :.
...
Also support ..= for closed-range slices, a la Rust.
The old syntax is still supported, but deprecated.
This fixes #669 .
2020-08-15 22:52:50 +01:00
Qi Xiao
eb37f92300
pkg/eval: Use eval.ChopLineEnding everywhere for removing line ending.
2020-05-06 23:10:57 +01:00
Qi Xiao
5a09222cf7
pkg/eval: Implement read-line.
...
This fixes #975 .
2020-05-06 23:03:49 +01:00
Qi Xiao
ba7bedcbd9
Support \r\n everywhere output is processed as individual lines.
...
This fixes #970 .
2020-05-03 23:30:23 +01:00
Qi Xiao
663b10d8e2
Suppress deprecations by default.
...
The behavior is controlled by a global flag that will be flipped for the release
branch. A flag is available to force deprecations to be shown or hidden.
2020-04-26 21:26:53 +01:00
Qi Xiao
cf6e048e58
pkg/eval: Support eval-time deprecation warning.
...
This addresses #898 .
2020-04-26 01:13:05 +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
b8505c7065
pkg/eval/source.go -> pkg/parse/source.go.
2020-04-25 18:26:17 +01:00
Qi Xiao
b1d9efbe47
pkg/eval: Tighten the type of Frame.intCh.
2020-04-15 23:03:58 +01:00
Qi Xiao
096ee354d6
pkg/eval: Simplify API for output capture.
2020-04-10 01:12:25 +01:00
Qi Xiao
af6b523e02
pkg/eval: Remove Frame.{eval,Call}.
2020-04-09 21:01:14 +01:00
Qi Xiao
ffa9727f14
pkg/eval: Remove Frame.srcRange.
...
Maintaining a state of current range is error-prone. Instead, always keep track
of range information explicitly.
2020-04-09 20:44:09 +01:00
Qi Xiao
9d280e9231
[cleanup] pkg/eval: Small stackTrace cleanup.
2020-03-29 14:53:34 +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
9bebf49b40
pkg/diag: Let NewContext accept a Ranging.
2020-03-28 22:12:42 +00:00
Qi Xiao
72234e70fa
[cleanup] pkg/eval: Replace frame.{begin,end} with a Ranging.
2020-03-28 22:03:42 +00:00
Qi Xiao
11919e83ec
[cleanup] pkg/eval: use diag.Ranging in op types.
2020-03-28 21:33:55 +00:00
Qi Xiao
570bf0f42a
pkg/eval: Factor all exception logic to (*Frame).makeException.
2020-01-12 18:00:45 -05:00
Qi Xiao
1788c13489
pkg/eval: Do not catch exceptions from panics in Evaler.
...
Nowhere uses this mechanism now. Delete the util in pkg/util.
This fixes #570 .
2020-01-12 17:57:27 -05:00
Qi Xiao
5550819ac0
pkg/eval: Check FD when using it as redir source.
...
This fixes #788 .
2020-01-12 00:42:18 +00:00
Qi Xiao
b3a48ed510
pkg/eval: Revamp Source.
2020-01-11 03:01:30 +00:00
Qi Xiao
e45fdf7228
Move all libraries to new pkg/.
2019-12-23 20:00:59 +00:00