This repository was archived by the owner on Mar 11, 2025. It is now read-only.
Add support for more whitespace positions within expressions - #327
Closed
cipriancraciun wants to merge 3 commits into
Closed
Add support for more whitespace positions within expressions#327cipriancraciun wants to merge 3 commits into
cipriancraciun wants to merge 3 commits into
Conversation
Collaborator
|
Similar to #323, I'm okay with the code generator changes but let's only have a specific test that tests some subset of the code generator for whitespace sensitivity. |
This was referenced May 25, 2020
* in function calls: `x ( 1 , 2 )`; * in path elements: `module :: element`; * in attributes: `x . y . z`; * in filter arguments: `x| filter ( 1 , 2 )`; * before unary operators: `! false` and `- 42`; * in grouped expressions: `( 1 + 2 )`; * also allow more than a single whitespace; Change some tests to include whitespaces in various positions.
cipriancraciun
force-pushed
the
patches/upstream/allow-spaces
branch
2 times, most recently
from
May 25, 2020 13:38
6021e9c to
643bf3a
Compare
cipriancraciun
force-pushed
the
patches/upstream/allow-spaces
branch
from
May 25, 2020 14:31
643bf3a to
bafe8a0
Compare
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
As reported in #315 at the moment whitespaces aren't allowed in many places where normal Rust would allow them.
This pull request adds support for whitespaces in:
x ( 1 , 2 );module :: element;x . y . z;x| filter ( 1 , 2 );! falseand- 42;Also change some tests to include whitespaces in various positions.
As noted in #315 at the moment there is a language ambiguity regarding bitwise or and filter application. As such at the moment the pipe character
|should not be preceded by a space when wanting filter application, and must always be preceded when wanting bitwise or. (This is not a deficiency of the current patch.)