NaPs/Dotconf — pull request #10 by stschiggerl (2013-08-28 12:29:01+00:00)
Title: Removed _check_line method from parser

I removed the _check_line method from parser since this is not really necessary in my point of view. I guess it should ensure that a section syntax is in a way that each key-value assignment is done in a separate line. But it keeps a user away from writing compact configuration of sections, like:

MySection {key1='val1' key2='val2'}

I tested the code __without__ the _check_line method even with nested sections, and the values are always correctly parsed and can be correctly read from the parse tree. This is even possible if you leave the spaces between 'val1' and key2 away.

So I suggest to remove this check to let the syntax (new lines or compact sections without new lines) up to the user apart from you have another reason why this check is absolutely necessary. With the present version, which means __with__ the _check_line code, the following configuration does not lead to a parsing error. One more reason that it is actually not necessary.

MySection {
key1='val1' key2='val2'
}