deps/ada-toml/tests/api/iterate_on_table/main.adb
raw| 1 | with Ada.Strings.Unbounded; |
| 2 | with Ada.Text_IO; |
| 3 | |
| 4 | with TOML; |
| 5 | with TOML.File_IO; |
| 6 | |
| 7 | procedure Main is |
| 8 | package TIO renames Ada.Text_IO; |
| 9 | |
| 10 | Value : constant TOML.TOML_Value := |
| 11 | TOML.File_IO.Load_File ("example.toml").Value; |
| 12 | begin |
| 13 | for E of Value.Iterate_On_Table loop |
| 14 | TIO.Put_Line (Ada.Strings.Unbounded.To_String (E.Key) & " is a " |
| 15 | & E.Value.Kind'Image); |
| 16 | end loop; |
| 17 | end Main; |