-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add Delimiter
tokens to the parser
#3644
Conversation
Looks good! But you have some E2E test failures that need to be addressed. Specifically,
should be updated. |
Closes #3634 Before: ![Screen Shot 2023-01-09 at 7 26 05 PM](https://user-images.githubusercontent.com/57543709/211441217-c525c7d9-49db-40b9-8e74-2f21b3bd4c43.png) After: ![Screen Shot 2023-01-09 at 7 26 17 PM](https://user-images.githubusercontent.com/57543709/211441245-e9ea357b-e1c7-45de-9142-69712604b193.png) This was originally to be closed in #3644 due to their similarity, but I came to realize how we handle implicit returns for function signatures will require some significant refactoring.
unit
type spansspans
for functions that return implicitly
} | ||
|
||
#[derive(Clone, Debug, Serialize)] | ||
pub struct ImplicitReturn { |
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.
Can we add a doc comment outining what this Span
is pointing to when we have an implicit return type.
Putting this on hold while I work on FuelLabs/fuelup#457 for the next beta release. |
We should rethink this solution in light of #4981 |
In this instance, we don't want the span to be none since it would mean that we couldn't point to where the error actually happens Side note: this problem actually occurred due to essentially a similar implementation of #4981 where the return type could be |
spans
for functions that return implicitlyDelimiter
tokens to the parser
Closing due to how big of a PR this became, and I no longer have time to try and finish it. There is some good stuff in here, for anyone who may decide to tackle the issue of adding delimiters to the parser and how that could affect the resulting AST, error handling and so on. |
Main issue is #5140
Adds
Delimiter
tokens, and updates their corresponding use cases.Ref #3634 #3734
Closes #3635
Closes #3594