File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,6 @@ based on JSON Schema.
18
18
The language is based on [ SDLang] ( https://sdlang.org ) , with a number of
19
19
modifications and clarifications on its syntax and behavior.
20
20
21
+ The current version of the KDL spec is ` 1.0.0 ` .
22
+
21
23
</section >
Original file line number Diff line number Diff line change @@ -137,6 +137,20 @@ mynode /-"commented" "not commented" /-key="value" /-{
137
137
}
138
138
```
139
139
140
+ ### Type Annotations
141
+
142
+ KDL supports type annotations on both values and nodes. These can be
143
+ arbitrary, but can be used by individual implementations or use-cases to
144
+ constrain KDL's basic types. A number of type names are also reserved to have
145
+ specific meanings.
146
+
147
+ ``` kdl
148
+ numbers (u8)10 (i32)20 myfloat=(f32)1.5 {
149
+ strings (uuid)"123e4567-e89b-12d3-a456-426614174000" (date)"2021-02-03" filter=(regex)r"$\d+"
150
+ (author)person name="Alex"
151
+ }
152
+ ```
153
+
140
154
### More Details
141
155
142
156
``` kdl
@@ -156,7 +170,7 @@ smile "😁"
156
170
foo123~!@#$%^&*.:'|/?+ "weeee"
157
171
158
172
// And you can also use unicode!
159
- ノード お名前= "☜(゚ヮ゚☜)"
173
+ ノード お名前= "☜(゚ヮ゚☜)"
160
174
161
175
// kdl specifically allows properties and values to be
162
176
// interspersed with each other, much like CLI commands.
You can’t perform that action at this time.
0 commit comments