-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Line continuations can be terminated with EOF only when a comment is present #337
Comments
As far as I understand the line continuations breaks a node, let's say:
So you can't really put nothing (or end the file) after
Instead a single line comment CAN end a file since it's not really part of a node, and it's not breaking a node. Or at least that's why I understood from the specification 😅. |
probably what we want is something like |
It feels like it would be better UX if the file is valid regardless of the final newline (and regardless of whether the editor is configured the insert the final $ zsh -c "echo 1 \\"
1 |
#352) * fix some confusion in grammar syntax, and actually specify the syntax itself Fixes: #345 * allow ,<> as identifier characters since they no longer need to be reserved * fix typo * disallow more code points and outright ban certain ones from KDL documents altogether (#353) Fixes: #250 * `r` prefix is no longer required for raw strings (#354) Fixes: #337
This has been merged into the kdl-v2 branch |
I thought this was already reported, but I can't seem to find any issue/discussion, so I'm opening a new one.
Right now, the line continuation is defined as
Where
single-line-comment
is (includes eof):This means that
node \ // comment <EOF>
is allowed as the last line, butnode \ <EOF>
is not, which feels weird. I thinkescline
should probably includeeof
as well.The text was updated successfully, but these errors were encountered: