mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
DOCS: Add quoted fields for tuples to the documentation.
This commit is contained in:
parent
89694f957e
commit
9524cd9d25
@ -32,6 +32,7 @@ let tuple = {
|
||||
field = "value",
|
||||
},
|
||||
list = [1, 2, 3],
|
||||
"quoted field" = "quoted value",
|
||||
};
|
||||
|
||||
// reference the field in the inner tuple in our tuple defined above.
|
||||
@ -41,6 +42,12 @@ tuple.inner.field;
|
||||
tuple.list.0;
|
||||
```
|
||||
|
||||
Selectors can quote fields in the selector if there are quoted fields with spaces in them.
|
||||
|
||||
```
|
||||
tuple."quoted field";
|
||||
```
|
||||
|
||||
### The environment Selector
|
||||
|
||||
There is a special selector in ucg for obtaining a value from the environment.
|
||||
|
@ -65,6 +65,7 @@ UCG also has two complex types.
|
||||
|
||||
Tuples are an ordered set of name value pairs. They are delimited by braces and should
|
||||
contain 1 or more `name = expression` pairs separated by commas. Trailing commas are allowed.
|
||||
Field names can be barewords with no spaces or they can be quoted strings.
|
||||
|
||||
```
|
||||
let tuple = {
|
||||
@ -72,6 +73,7 @@ let tuple = {
|
||||
inner = {
|
||||
number = 1,
|
||||
},
|
||||
"quoted field" = "quotd value",
|
||||
};
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user