src/lib/INIReader.cpp
branchv_0
changeset 26 b1f6fa3a6555
parent 25 b9067d2812e5
child 27 e9aad9dd823a
--- 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 + "'");
 					}
 				}