cmd/cue: hook up encoding/toml for import and export
This includes adding TOML to internal/filetypes and internal/encoding
so that other APIs such as cue/load work with TOML too.
Note that this required tweaking encoding/toml's decoder so that
it returns ast.Expr nodes as the internal/encoding types expect.
This is not a hard change to make, as a TOML document is just a list
of top-level fields which can be represented by a struct literal too.
Fixes #68.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I0eeeaf198a336e82caaed96aac3b5bbcbae57d57
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1198540
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>