Skip to content

Add error message for Parsers:1329 #1624

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
merged 2 commits into from
Oct 25, 2016
Merged

Conversation

sebastianharko
Copy link

@sebastianharko sebastianharko commented Oct 25, 2016

@felixmulder Error message for Parsers: 1329.

Copy link
Contributor

@felixmulder felixmulder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Break the lines and we're good to go.

Another thing I would actually probably do is move the codeX values into the explanation like this:

val explanation = {
  val code1 = ...
  val code2 = ...
  val code3 = ...
  val code4 = ...

  hl"""..."""
}

since they provide no semantic information that IDEs would be interested in :)

val code4 = "for i <- 1 to 3 do println(i) // notice the 'do' keyword"

val explanation =
hl"""When the enumerators in a for comprehension are not placed in parentheses or braces, a ${"do"} or ${"yield"} statement
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you break this line so that it is max 80 chars long?

|
|but the ${"yield"} keyword is still required.
|
|For comprehensions that simply perform a side effect without yielding anything can also be written without parentheses
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with this guy :)

@felixmulder
Copy link
Contributor

felixmulder commented Oct 25, 2016

Oh and ping me when the changes have been made - if you guys just update the PR, I don't get notifications about it unfortunately...maybe that's a setting I can change somewher - I'll have a look!

cc: @ShaneDelmore, @thiagoandrade6

@felixmulder felixmulder merged commit 0cd907d into scala:master Oct 25, 2016
@felixmulder
Copy link
Contributor

Thanks @sebastianharko !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants