<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/example.cudl
diff options
context:
space:
mode:
Diffstat (limited to 'example.cudl')
-rw-r--r--example.cudl65
1 files changed, 65 insertions, 0 deletions
diff --git a/example.cudl b/example.cudl
new file mode 100644
index 0000000..3ee0ab6
--- /dev/null
+++ b/example.cudl
@@ -0,0 +1,65 @@
+# Without a schema
+
+{
+ people: [{
+ name: "Jack Smith"
+ sequence: [2 1 3 4 7 11 18 29 47]
+ language: "zig"
+ "hello world":|
+ """
+ const std = @import("std");
+
+ pub fn main() !void {
+ const stdout = try std.io.getStdOut();
+ try stdout.write("hello world\n");
+ }
+ """
+ "is me": %true
+ } {
+ name: "John Doe"
+ sequence: [2 3 5 7 11 13 17 19 23]
+ language: "C"
+ "hello world":|
+ """
+ int puts(const char *s);
+
+ int main(int argc, char *argv[]) {
+ puts("hello world");
+ return 0;
+ }
+ """
+ "is me": %false
+ }]
+}
+
+# With a schema
+
+people: [
+ name: Jack Smith
+ sequence: [2 1 3 4 7 11 18 29 47]
+ language: zig
+ "hello world":|
+ """
+ const std = @import("std");
+
+ pub fn main() !void {
+ const stdout = try std.io.getStdOut();
+ try stdout.write("hello world\n");
+ }
+ """
+ "is me": %true
+ ;
+ name: John Doe
+ sequence: [2 3 5 7 11 13 17 19 23]
+ language: C
+ "hello world":|
+ """
+ int puts(const char *s);
+
+ int main(int argc, char *argv[]) {
+ puts("hello world");
+ return 0;
+ }
+ """
+ "is me": %false
+]