-
-
Notifications
You must be signed in to change notification settings - Fork 414
Faulty code: improve error block node #13264
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
Merged
MarcusDenker
merged 4 commits into
pharo-project:Pharo12
from
privat:faulty-code-error-block-node
Apr 4, 2023
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
89c5861
RBCodeSnippet class>>#badVariableAndScopes fix unindended error in sn…
privat 7b6a9a9
RBParser>>#parseBlock fix content and stop position of RBBlockErrorNode
privat 059ae3f
RBCodeSnippet: update content and position of error block node
privat 364a484
Merge branch 'Pharo12' into faulty-code-error-block-node
privat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
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.
There is a dot here because you consider that the end of a unclosed block is after its temporaries declaration?
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.
Bad temps are stored into a synthetic first statement of the statement sequence to prevent ast visitors to mistake them for legit temp declarations. It's a ok design I think.
The formatter was not developed to format fauly ast (sometimes even non faulty ast :p ) so it just prints both bar (because temp declarations have two bars) and a dot (because statement, even synthetic , have a dot).
I have a wip branch that tries to fix theses formatting things.
But it's more cosmetic than useful, because formatting broken ast make little sense. The idea to check it in snippets is more to verify that parts are not lost, not the punctuation.
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.
And why there wasn't a dot before the PR. Because the contents of faulty blocks were the content of the statement sequence, not the statement sequence itself. Therefore, losing possible legitimate temps, and losing the information that the contents are statements. So the content were separated with simple space instead of dots.