<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/example.cudl
blob: 3ee0ab6b8bf331f35ad2969da91a40e53145e61a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
]