From 7b4ffa8c2884132900a7cdfeb61a4ffc125ce7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sat, 11 Sep 2021 21:11:05 -0700 Subject: [PATCH] update site for 1.0.0 --- src/_includes/partials/description.md | 2 ++ src/_includes/partials/overview.md | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/_includes/partials/description.md b/src/_includes/partials/description.md index 61f987f..5991387 100644 --- a/src/_includes/partials/description.md +++ b/src/_includes/partials/description.md @@ -18,4 +18,6 @@ based on JSON Schema. The language is based on [SDLang](https://sdlang.org), with a number of modifications and clarifications on its syntax and behavior. +The current version of the KDL spec is `1.0.0`. + diff --git a/src/_includes/partials/overview.md b/src/_includes/partials/overview.md index eb7e155..3b75a64 100644 --- a/src/_includes/partials/overview.md +++ b/src/_includes/partials/overview.md @@ -137,6 +137,20 @@ mynode /-"commented" "not commented" /-key="value" /-{ } ``` +### Type Annotations + +KDL supports type annotations on both values and nodes. These can be +arbitrary, but can be used by individual implementations or use-cases to +constrain KDL's basic types. A number of type names are also reserved to have +specific meanings. + +```kdl +numbers (u8)10 (i32)20 myfloat=(f32)1.5 { + strings (uuid)"123e4567-e89b-12d3-a456-426614174000" (date)"2021-02-03" filter=(regex)r"$\d+" + (author)person name="Alex" +} +``` + ### More Details ```kdl @@ -156,7 +170,7 @@ smile "😁" foo123~!@#$%^&*.:'|/?+ "weeee" // And you can also use unicode! -ノード お名前="☜(゚ヮ゚☜)" +ノード お名前="☜(゚ヮ゚☜)" // kdl specifically allows properties and values to be // interspersed with each other, much like CLI commands.