New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misleading error message from cfg_parse #116
Comments
Possibly, but not easily. The string quotes enables multi-line input, so it's not until a left brace is found that a possible syntax error is detected. I guess we could add some flag so we could use end-of-line or end qoute to close a string. What do you think? |
In our case I think we'd prefer a flag that forbids new lines for strings, as we should never do that in our configuration file. That being said, I don't know what By the way, it's the right brace that triggers the parsing error, the left being parsed within a string from what you say. So it's kind of weird that the parser doesn't realize it's all very weird tokens until then? |
If it's multi-line string input you couldn't detect a syntax error until the first character after the next quote at the earliest (which may well be EOF), since braces in strings have to be allowed, right? I agree that a flag to disable multi-line strings would be useful to us, if possible. |
@Airblader +1 Yeah, a do-what-I-mean flag would be highly useful. Not sure when I'll have the time to implement it though. Any takers for a PR? |
I might give it a try, unless experienced |
@eplanet Go ahead, and please feel free to ask questions about the tokenizer or parser in this thread. |
@eplanet How did it go? |
Thanks for following up! I'm very sorry, I gave it a try two times but didn't manage to focus enough to make something worth it. If you want to take over you're very welcome. |
@eplanet No worries, just following up on things. We'll leave the issue open then, maybe someone else picks it up. ... if you do, post here please :) |
Hello! I'm following
i3status
#249 bug. It seems that if we miss a closing quote in the following configuration:The displayed error isn't correct:
missing opening brace for section 'wireless'
.It seems there's little we can do on our end, so do you think this could be improved here?
Thanks!
The text was updated successfully, but these errors were encountered: