Rewrite parser more readable, little faster#8
Conversation
|
@benoitc thumbs up/down - making things better, or uninteresting? Please let me know when you get a chance. |
|
@unix1 sorry I missed this change.... will have a look later in the day. |
|
@benoitc, any luck? Feedback? I'm all ears. |
|
@benoitc ping? |
|
I completely forgot that change... Sorry for that ... I will look at it now. |
|
more than one year later... Sorry for that... Just if you remember, can you tell me what you meant by |
|
@unix1 i guess i see the point. I tested your implementation and it mostly worked. See comments. I know it's a little late to ask, but in case of what was your idea to add support for multilines values? |
There was a problem hiding this comment.
the case where there are no sections in the file should be handled here. It's useful when you need to pass a local file that will contains the updates.
|
@benoitc thanks for looking and providing feedback. I'll probably have time to look at this this weekend. As for multiline values, I remember I couldn't find a standard way of doing it (people do it their own ways when they think they need it, and current master didn't support it) - that's why I didn't put it in. I don't have a use case; unless you have one, I don't think it should be there. In the hypothetical future where it's needed, we could say: any config value that ends with a backslash continues on next line: [letter]
message = Hello,\
This is a message\
Bye
from = Fooor any non-config non-section non-comment non-empty line: [letter]
message = Hello,
This is a message
Bye
from = FooBut it gets ugly fast; and again, unless you have a use case, I'd keep it out for now. |
@benoitc let me know if you are open to this kind of parser rewrite. Some notes:
Please let me know your thoughts.