-
Notifications
You must be signed in to change notification settings - Fork 605
Improve comments on Dialect
#1366
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
Conversation
@@ -114,16 +115,20 @@ pub trait Dialect: Debug + Any { | |||
fn is_delimited_identifier_start(&self, ch: char) -> bool { | |||
ch == '"' || ch == '`' | |||
} | |||
|
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.
the use of whitespace between functions was inconsistent -- sometimes there was a space and sometimes not. Thus I made it all consistent with my personal preference (put a space between functions0
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 really wish rustfmt
would fix this to be consistent.
Pull Request Test Coverage Report for Build 10266109448Details
💛 - Coveralls |
Thank you for the review @lovasoa |
@@ -114,16 +115,20 @@ pub trait Dialect: Debug + Any { | |||
fn is_delimited_identifier_start(&self, ch: char) -> bool { | |||
ch == '"' || ch == '`' | |||
} | |||
|
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 really wish rustfmt
would fix this to be consistent.
/// Get the precedence of the next token. This "full" method means all precedence logic and remain | ||
/// in the dialect. while still allowing overriding the `get_next_precedence` method with the option to | ||
/// fallback to the default behavior. | ||
/// Get the precedence of the next token, looking at the full token stream. |
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.
Thanks for fixing this, sorry my comment was so broken.
I'm not sure "full token stream" is really the right distinction, my name was probably poor.
If we didn't might breaking the API, we could probably call the above get_next_precedence_opt
- the only real difference is that it returns an Option
so can fallback to the default behaviour.
Or we could call this method get_next_precedence_default
.
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.
We haven't yet released this PR so we can change the name without any API breakages yet
Any chance you can make a PR with a proposed name change?
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.
@samuelcolvin made a PR here: #1378 ❤️
While reviewing @samuelcolvin 's PR on #1360 I noticed several areas of the
Dialect
documentation that could be improved.This PR updates the documentation for DIalect