mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
DOCS: Formatting and organization changes.
Additionally: * Added an overview * Expanded the docs for the NULL type.
This commit is contained in:
parent
0ef3097b75
commit
2134d79f0d
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG Expressions"
|
title = "Expressions"
|
||||||
weight = 3
|
weight = 3
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG Formal Grammar"
|
title = "Formal Grammar"
|
||||||
slug = "grammar"
|
slug = "grammar"
|
||||||
weight = 1
|
weight = 1
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
|
30
docsite/site/content/reference/overview.md
Normal file
30
docsite/site/content/reference/overview.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
+++
|
||||||
|
title = "Overview"
|
||||||
|
slug = "overview"
|
||||||
|
weight = 0
|
||||||
|
sort_by = "weight"
|
||||||
|
in_search_index = true
|
||||||
|
+++
|
||||||
|
|
||||||
|
UCG is an expression oriented functional language with immutability,
|
||||||
|
copy-on-write semantics and forward type inference. Everything in UCG is an
|
||||||
|
expression except for a few statements that introduce named bindings or
|
||||||
|
generate an output.
|
||||||
|
|
||||||
|
UCG is purpose built for constructing configurations. Anything that is not
|
||||||
|
useful for that is excluded. All ucg output targets one of the compilation
|
||||||
|
conversion targets.
|
||||||
|
|
||||||
|
UCG can import supported configuration formats and transform them before
|
||||||
|
outputting them into one of the compilation conversion targets. UCG also has
|
||||||
|
built in support test assertions in your configuration generation and
|
||||||
|
transformation logic.
|
||||||
|
|
||||||
|
Among the possibilities this opens up are:
|
||||||
|
|
||||||
|
* Slowly migrating existing configuration formats over to UCG
|
||||||
|
* Sharing common configuration values across static configurations
|
||||||
|
* Enforcing invariants in your configurations at build time
|
||||||
|
* Unit testing your configuration generation logic
|
||||||
|
* Converting one config format to another config format
|
||||||
|
* Dynammic querying of your configurations using the `ucg eval` command
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG Statements"
|
title = "Statements"
|
||||||
weight = 4
|
weight = 4
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG types"
|
title = "Types"
|
||||||
weight = 2
|
weight = 2
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
@ -50,7 +50,9 @@ Strings are any double quoted text. You can use the `\` to esacpe characters in
|
|||||||
### NULL or the Empty type
|
### NULL or the Empty type
|
||||||
|
|
||||||
NULL is the empty type. It represents the absence of a value. It is represented by the
|
NULL is the empty type. It represents the absence of a value. It is represented by the
|
||||||
symbol `NULL`.
|
symbol `NULL`. The empty type is special in that any field regardless of type can be assigned
|
||||||
|
the `NULL` value and any field of NULL value can be assigned any type. This is most useful when
|
||||||
|
you need a module, tuple, or function to have fields or parameters that can be any type.
|
||||||
|
|
||||||
```
|
```
|
||||||
let empty = NULL;
|
let empty = NULL;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG functional operations"
|
title = "Functional operations"
|
||||||
weight = 5
|
weight = 5
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG List Modules"
|
title = "List Operations"
|
||||||
weight = 1
|
weight = 1
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG Schema Modules"
|
title = "Schema Helpers"
|
||||||
weight = 4
|
weight = 4
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG Testing Modules"
|
title = "Testing Helpers"
|
||||||
weight = 3
|
weight = 3
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
+++
|
+++
|
||||||
title = "UCG Tuple Modules"
|
title = "Tuple Operations"
|
||||||
weight = 2
|
weight = 2
|
||||||
sort_by = "weight"
|
sort_by = "weight"
|
||||||
in_search_index = true
|
in_search_index = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user