aboutsummaryrefslogtreecommitdiff
path: root/examples/ini
diff options
context:
space:
mode:
Diffstat (limited to 'examples/ini')
-rw-r--r--examples/ini/ini.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/ini/ini.tm b/examples/ini/ini.tm
index 4e5ec776..5952bb00 100644
--- a/examples/ini/ini.tm
+++ b/examples/ini/ini.tm
@@ -8,7 +8,7 @@ _HELP := "
func parse_ini(path:Path -> {Text:{Text:Text}}):
text := path:read() or exit("Could not read INI file: $\[31;1]$(path.text_content)$\[]")
- sections := {:Text:@{Text:Text}}
+ sections := @{:Text:@{Text:Text}}
current_section := @{:Text:Text}
# Line wraps:
@@ -26,7 +26,7 @@ func parse_ini(path:Path -> {Text:{Text:Text}}):
value := line:replace($/{..}={..}/, "\2"):trim()
current_section:set(key, value)
- return {k:v[] for k,v in sections}
+ return {k:v[] for k,v in sections[]}
func main(path:Path, key:Text?):
keys := (key or ""):split($|/|)