about summary refs log tree commit diff
path: root/fun/watchblob
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-05-27T18·15-0400
committerclbot <clbot@tvl.fyi>2024-06-01T09·04+0000
commit96ce9aea046b584c411afdc210e73764f27ff202 (patch)
tree58148203dd243f3498f85f831b76e18236235215 /fun/watchblob
parentbbced9222cba640e4f90adb0af55e0533c591b45 (diff)
feat(tvix/repl): Support multiline input r/8186
Transparently support multiline input in the Tvix REPL, by handling the
UnexpectedEOF error returned by the parser and using it to progressively
build up an input expr over multiple iterations of the REPL's outer
loop.

This works quite nicely:

❯ cargo r --bin tvix
   Compiling tvix-cli v0.1.0 (/home/aspen/code/depot/tvix/cli)
     Finished dev [unoptimized + debuginfo] target(s) in 1.72s
     Running `target/debug/tvix`
tvix-repl> { foo
         >   =
         >   1;
         > }
=> { foo = 1; } :: set
<press up arrow>
tvix-repl> { foo
  =
  1;
}
=> { foo = 1; } :: set

Change-Id: Ib0ed4766b13e8231d696cdc27281ac158e20a777
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11732
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: aspen <root@gws.fyi>
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'fun/watchblob')
0 files changed, 0 insertions, 0 deletions