newline = ${ "\n" | "\r" }
space = ${ " "+ }
other = ${ !(pair) ~ ANY }
comment = ${ single_line_comment | multiline_comment }
single_line_comment = _{ "//" ~ (!(newline) ~ ANY)* }
multiline_comment = _{ "/*" ~ (!("*/") ~ ANY)* ~ "*/"}
string_type = _{
("\"" ~ (!(newline | "\"") ~ ANY)* ~ "\"")
}
key = ${ string_type ~ (" ")* ~ ":" ~ (" ")* }
string = ${ string_type }
pair = _{ key ~ string }
line = _{ pair | comment | space | other | newline }
item = _{ SOI ~ line* ~ EOI }