feat(toml): add support for TOML

This commit is contained in:
Hoang Nguyen 2023-11-19 00:00:00 +07:00
parent 7cf719975b
commit eb2e0affc8
No known key found for this signature in database
GPG key ID: B0567C20730E9B11
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,15 @@
(table
"[" @delimiter
"]" @delimiter @sentinel) @container
(array
"[" @delimiter
"]" @delimiter @sentinel) @container
(inline_table
"{" @delimiter
"}" @delimiter @sentinel) @container
(table_array_element
"[[" @delimiter
"]]" @delimiter @sentinel) @container

View file

@ -0,0 +1,20 @@
[table]
[table.sub]
people.names = [ "John", "Joe" ]
inline-table = { x = 0.1, y = 2 }
array-of-table = [
{ name = "Alice", level = 2 },
{ name = "Bob", level = 1 },
]
[[array-of-table2]]
z = 3
[[array-of-table2.t]]
desc = "Index 1"
[[array-of-table2]]
z = 30
t.desc = "Index 2"