-
Notifications
You must be signed in to change notification settings - Fork 50
Better error printing #85
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
if !savePoints.isEmpty { | ||
var result = "save points:\n" | ||
for point in savePoints { | ||
result += " \(point.describe(in: input))\n" | ||
} | ||
return result | ||
} | ||
return "" |
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.
Nit: May read better and reduce nesting if we early return with guard
.
var description: String { | ||
String(describing: self.destructure) | ||
extension Processor.SavePoint { | ||
func describe(in input: Input) -> String { |
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.
func describe(in input: Input) -> String { | |
func description(in input: Input) -> String { |
Nit: The method doesn't have side effects. Therefore suggesting a noun phrase instead of an imperative.
Ok I'm confused. I thought the ME bug fix made it in somewhere else, but if this is what pulls it in fine. Maybe I just don't know how to do |
efceaa6
to
d233b86
Compare
@swift-ci please test linux platform |
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.
LGTM, thanks!
Better printing for our parse errors