Skip to content

Commit 9e7daef

Browse files
committed
feat: add more showcases
1 parent 3bf1b7d commit 9e7daef

File tree

6 files changed

+131
-0
lines changed

6 files changed

+131
-0
lines changed

playground/complex.toon

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
project:
2+
name: "Dream Engine"
3+
name2: 'Dream Engine'
4+
list:
5+
- item1
6+
- item2
7+
metadata:
8+
key: value
9+
key1: value
10+
version: 3
11+
active: true
12+
metadata:
13+
created: "2025-11-06"
14+
tags[4]{id,name}:
15+
1,ai
16+
2,render
17+
3,story
18+
4,test
19+
authors[3]{id,name,role}:
20+
1,Cláudio Marcelo Silva,lead
21+
2,Jane Doe,artist
22+
3,John Smith,engineer
23+
description: "Complex nested TOON example with escape sequences: line1\\nline2"
24+
notes:
25+
-: "A complex project structure"
26+
-: "Testing nested blocks and mixed tables"
27+
settings:
28+
engine:
29+
name: "Flux"
30+
version: 1.12
31+
flags[3]{key,value}:
32+
debug,true
33+
safe_mode,false
34+
allow_remote,false
35+
ui:
36+
theme: "dark"
37+
layout:
38+
panels[2]{id,title,visible}:
39+
1,Main,true
40+
2,Inspector,false
41+
assets[4]{id,type,path,size}:
42+
1,image,"/textures/sky.png",2048
43+
2,model,"/models/character.obj",4096
44+
3,audio,"/sounds/theme.ogg",512
45+
4,script,"/scripts/init.kts",12
46+
build:
47+
success: true
48+
duration: 4.35
49+
logs[3]{level,message}:
50+
info,"Build started"
51+
warn,"Low memory"
52+
info,"Build finished successfully"

playground/embed.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
toon syntax
2+
3+
```toon
4+
project[3]:
5+
name: "Dream Engine"
6+
name2: 'Dream Engine'
7+
version: 3
8+
active: true
9+
```

playground/file.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
project:
2+
name: "Dream Engine"
3+
version: 3
4+
active: true
5+
metadata:
6+
created: "2025-11-06"
7+
tags[4]{id,name}:
8+
1,ai
9+
2,render
10+
3,story
11+
4,test
12+
authors[3]{id,name,role}:
13+
1,Cláudio Marcelo Silva,lead
14+
2,Jane Doe,artist
15+
3,John Smith,engineer
16+
description: "Complex nested TOON example with escape sequences: line1\\nline2"
17+
notes:
18+
-: "A complex project structure"
19+
-: "Testing nested blocks and mixed tables"
20+
settings:
21+
engine:
22+
name: "Flux"
23+
version: 1.12
24+
flags[3]{key,value}:
25+
debug,true
26+
safe_mode,false
27+
allow_remote,false
28+
ui:
29+
theme: "dark"
30+
layout:
31+
panels[2]{id,title,visible}:
32+
1,Main,true
33+
2,Inspector,false
34+
assets[4]{id,type,path,size}:
35+
1,image,"/textures/sky.png",2048
36+
2,model,"/models/character.obj",4096
37+
3,audio,"/sounds/theme.ogg",512
38+
4,script,"/scripts/init.kts",12
39+
build:
40+
success: true
41+
duration: 4.35
42+
logs[3]{level,message}:
43+
info,"Build started"
44+
warn,"Low memory"
45+
info,"Build finished successfully"

playground/nested_objects.toon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
app:
2+
version: 1
3+
users[2]{id,name,role}:
4+
1,Alice,admin
5+
2,Bob,user

playground/scalar.toon

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
config:
2+
title: "My App"
3+
debug: true
4+
limits:
5+
retries: 3
6+
timeout: 5.5
7+
limits:
8+
retries: 3
9+
timeout: 5.5
10+
ok: true
11+
no: false

playground/simple_table.toon

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# --- simple table ---
2+
users[2]{id,name,role}:
3+
# row 1
4+
1,Alice,admin
5+
# row 2
6+
2,Bob,user
7+
# --- end table ---
8+
a:
9+

0 commit comments

Comments
 (0)