# HG changeset patch # User František Kučera # Date 1606520800 -3600 # Node ID b1f6fa3a655562df0347f8ffd43c36b0304fd4f2 # Parent b9067d2812e56a9fea41b217c595785d895b3310 TODO comments diff -r b9067d2812e5 -r b1f6fa3a6555 src/lib/INIReader.cpp --- a/src/lib/INIReader.cpp Fri Nov 27 16:43:38 2020 +0100 +++ b/src/lib/INIReader.cpp Sat Nov 28 00:46:40 2020 +0100 @@ -37,8 +37,17 @@ * If there should be some spaces or tabs, they should be placed on the previous line before the „\“. * If a line break is desired, it should be written as \n (escaped) or the value should be quoted in " or '. * + * TODO: several options: + * - enabled, disabled + * - if disabled, then: keep backslash, trim backslash, escape backslash + * (keep requires support in some further unescaping phase, or it will cause an error) + * - keep or trim the line end + * - keep or trim the leading spaces + * - allow comments interleaved with continuing lines (the freaky systemd syntax) + * * Related specifications: * - https://docs.oracle.com/javase/8/docs/api/index.html?java/util/Properties.html + * - https://www.freedesktop.org/software/systemd/man/systemd.syntax.html */ bool trimLeadingSpacesOnContinuingLines = true; @@ -384,6 +393,11 @@ } else if (ch == '\n') { get(); } else { + // TODO: optional support for multiple tokens in a single entry? + // modes: array, concatenate + // some-array-1 = "item 1" "item 2" 'item 3' item 4 + // some-array-2 = "item 1" "item 2" 'item 3' item_4 item_5 + // some-bash-style-string-value = "this "will' be' concatenated → this will be concatenated throw std::logic_error(std::string("unexpected content after the quoted value: key='") + fullKey + "' value='" + event.value + "'"); } }