Allow newlines within ParameterList and ImportStatement#26
Open
cr7pt0gr4ph7 wants to merge 2 commits into
Open
Allow newlines within ParameterList and ImportStatement#26cr7pt0gr4ph7 wants to merge 2 commits into
cr7pt0gr4ph7 wants to merge 2 commits into
Conversation
Allow newlines in certain places to allow spliting very large field types
and import lists across multiple lines while making sure the grammar
remains unambiguous.
Newlines are now allowed in the following places:
1) Directly after the opening bracket "[" of a parameter list resp.
directly after the opening brace "{" of an imported name list.
2) Directly after (but not before) a comma "," within a parameter list or
imported name list.
3) Directly before the closing bracket "]" of a parameter list resp.
directly before the closing brace "}" of an imported name list.
4) As before: To terminate a syntactically valid declaration or line comment
5) As before: Before, after and between the declarations within a section
6) As before: Within triple-quoted strings
So this is valid:
Note[
"TypeA",
"TypeB"
]
Note
Note["TypeA"]
Note["TypeA"
]
Note[
"TypeA"]
While all of these are not:
Note
["TypeA"]
Note[
"TypeA"
, "TypeB"
]
539b718 to
8baf05a
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Allow newlines in certain places to allow spliting very large field types and import lists across multiple lines while making sure the grammar remains unambiguous.
Newlines are now allowed in the following places:
[of a parameter list resp. directly after the opening brace{of an imported name list.,within a parameter list or imported name list.]of a parameter list resp. directly before the closing brace}of an imported name list.So these are valid:
Tip
✅ Valid Examples:
While all of these are not:
Caution
❌ Invalid Examples: