Skip to content

documentation: fix tokens that can start indentation region #17219

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 1 commit into from
Apr 17, 2023

Conversation

brandonspark
Copy link
Contributor

@brandonspark brandonspark commented Apr 7, 2023

What:

The documentation currently states:

     *      The following tokens can start an indentation region:
     *
     *         :  =  =>  <-  if  then  else  while  do  try  catch  finally  for  yield  match

This is not actually true, however, if you look at the source of the predicate
which determines which tokens can start an indentation region: https://github.com/lampepfl/dotty/blob/865aa639c98e0a8771366b3ebc9580cc8b61bfeb/compiler/src/dotty/tools/dotc/parsing/Tokens.scala#L276

In particular, if I'm not mistaken, return, throw, and with are all also tokens which have this property.

This PR just amends the documentation to reflect that.

@brandonspark
Copy link
Contributor Author

Can I have a new check? I've signed the CLA now.

@anatoliykmetyuk anatoliykmetyuk merged commit ad5eb6c into scala:main Apr 17, 2023
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