Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
More tests for backslash behaviour #438
More tests for backslash behaviour #438
Changes from all commits
aa13225
8717ba3
14096ed
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I'm confused: is this actually allowed? I think it should be (just allow all whitespace to be escaped even if it's meaning less) but right now I'm not sure what the spec actually says right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the filename I figured this test was missing something...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is allowed per spec, but I'm surprised by that.
line-space
doesn't containescline
, onlynode-space
hasescline
All whitespace between nodes is
line-space
, so on first sight this test would be invalid, but…base-node
starts withslashdash? type? node-space* string
which means this is validbut this isn't
I personally always read the start of
base-node
asslashdash? (type node-space*)? string
, as I interpreted the node-space to be meant as space between the type and name. Apparently that's also how I implemented this, as my parser fails this test atm.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...I noticed this recently in kdl-rs too and it made me wonder whether
escline
should be part ofline-space
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what in the spec allows this, btw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see:
is allowed and
(type)
is optional, thereforeis allowed.
Quite separately,
and even
are allowed because
/-
can always be followed bynode-space
, even when not in a node.IMHO, this is too confusing and
escline
belongs inline-space
.