mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
DOCS: Add details about the repl to our getting started doc.
This commit is contained in:
parent
f349293400
commit
354f072c98
@ -70,6 +70,27 @@ cat sample.yaml
|
|||||||
|
|
||||||
UCG will generate the yaml file with the same name as the file containing the out statement.
|
UCG will generate the yaml file with the same name as the file containing the out statement.
|
||||||
|
|
||||||
|
The UCG repl
|
||||||
|
------------
|
||||||
|
|
||||||
|
UCG has a built in repl where you can explore the language interactively. It supports the full
|
||||||
|
set of UCG expressions and statements. As well as some repl directives that are not part of the
|
||||||
|
UCG language proper.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ucg repl
|
||||||
|
Welcome to the UCG repl. Ctrl-D to exit
|
||||||
|
Type '#help' for help.
|
||||||
|
|
||||||
|
1> let foo = "bar";
|
||||||
|
"bar"
|
||||||
|
1> out json {foo="bar"};
|
||||||
|
{
|
||||||
|
foo = "bar",
|
||||||
|
}
|
||||||
|
1>
|
||||||
|
```
|
||||||
|
|
||||||
The UCG command line
|
The UCG command line
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
@ -694,9 +694,9 @@ You can experiment with conversion in the repl:
|
|||||||
|
|
||||||
```
|
```
|
||||||
> convert json {foo="bar"};
|
> convert json {foo="bar"};
|
||||||
'{
|
"{
|
||||||
"foo": "bar"
|
\"foo\": \"bar\"
|
||||||
}'
|
}"
|
||||||
>
|
>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user