diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 17:26:01 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 17:26:01 -0500 |
| commit | 145a078387b8bce5e8e3c93c333c030aa7455e4c (patch) | |
| tree | 48e113e07888a546bdf9543db2a19587aeef3071 /examples/ini | |
| parent | 8dd51a113ead1fe88c80af9165219ca5398715f6 (diff) | |
Make the compiler stricter about not promoting local value variables to
pointers
Diffstat (limited to 'examples/ini')
| -rw-r--r-- | examples/ini/ini.tm | 4 |
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($|/|) |
