Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
roots.clear
var stream = new FileReader.open(ini_file)
var path: nullable String = null
roots.clear
var stream = new FileReader.open(ini_file)
var path: nullable String = null
while not stream.eof do
var line = stream.read_line
while not stream.eof do
var line = stream.read_line
if line.is_empty then
continue
else if line.has_prefix(";") then
if line.is_empty then
continue
else if line.has_prefix(";") then
set_node(path, null)
else
var parts = line.split("=")
set_node(path, null)
else
var parts = line.split("=")
+ assert parts.length > 1 else
+ print "Error: malformed ini at line {line_number}"
+ end
var key = parts[0].trim
var val = parts[1].trim
if path == null then
var key = parts[0].trim
var val = parts[1].trim
if path == null then