Debian Codegraph @

parsing/toml/testdata/complex_example.toml

raw symbols SCIP
1 # Comprehensive TOML example exercising many features
2
3 "quoted key" = "quoted value"
4
5 "a.b" = 42
6
7 title = "TOML Example"
8
9 [owner]
10 name = "Tom Preston-Werner"
11 organization = "GitHub"
12 bio = "Developer\nMaintainer"
13
14 # Quoted keys and dotted keys
15 [server]
16 ip = "192.168.0.1"
17 port = 8080
18
19 [server.settings]
20 # inline table-like structure but using table header
21 max_connections = 100
22 enabled = true
23
24 # Inline table example
25 props = { key1 = "value1", key2 = "value2" }
26
27 # Arrays
28 nums = [1, 2, 3]
29 mix = [1, "two", true]
30 empty = []
31 trailing = ["a", "b",]
32
33 # Nested inline table and array
34 props2 = { sub = { a = 1 }, arr = [1,2] }
35
36
37 # Mixed dotted and quoted
38 [a."b.c"]
39 d = "x"
40
41 # Negative and scientific numbers
42 n = -5
43 f = 1e3
44
45 # Arrays of inline tables
46 items = [{a = 1}, {a = 2}]
47
48 # Array of tables
49 [[products]]
50 name = "Hammer"
51 sku = 738594937
52
53 [products.appearance]
54 color = "red"
55
56 [[products]]
57 name = "Screwdriver"
58 sku = 12341234
59
60 # Nested table headers
61 [database]
62 server = "192.168.1.1"
63 ports = [ 8001, 8001, 8002 ]
64 connection_max = 5000
65 enabled = true
66
67 [database.replica]
68 name = "replica1"
69
70 # Multi-line basic string
71 multiline = """
72 This is a
73 multiline string.
74 """
75
76 # Literal multi-line string
77 literal = '''
78 This is a 'literal' multiline
79 string with no escapes.
80 '''
81
82 # Comments and spacing
83 # End of file