Skip to content

Spec: Syntax changes. #17943

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 8 commits into from
Jun 21, 2023
Merged

Spec: Syntax changes. #17943

merged 8 commits into from
Jun 21, 2023

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Jun 7, 2023

[skip ci]

@sjrd sjrd force-pushed the spec-syntax-changes branch from 4434cdf to a77595e Compare June 20, 2023 08:30
@sjrd sjrd force-pushed the spec-syntax-changes branch from a77595e to 1e09225 Compare June 20, 2023 13:08
@sjrd sjrd requested a review from bishabosha June 20, 2023 13:22
```
as derives end extension infix inline opaque open transparent using | * + -
as derives end extension infix inline opaque
Copy link
Member

Choose a reason for hiding this comment

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

seems uncomfortably close

Suggested change
as derives end extension infix inline opaque
as derives end extension infix inline opaque

```
Import ::= ‘import’ ImportExpr {‘,’ ImportExpr}
ImportExpr ::= SimpleRef {‘.’ id} ‘.’ ImportSpecifier
| SimpleRef `as` id
Copy link
Member

@bishabosha bishabosha Jun 20, 2023

Choose a reason for hiding this comment

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

not seen SimpleRef on the lexical syntax page, but it is in the Types page

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's normal. SimpleRef is a syntax-level non-terminal. The lexical syntax page only shows lexer-level tokens.

If a final wildcard `‘*’` is present, all non-`given` importable members ´z´ of ´p´ other than `´x_1, ..., x_n, y_1, ..., y_n´` are also made available under their own unqualified names.

Non-given import selectors work in the same way for type and term members.
For instance, an import clause `import ´p´.{´x´ => ´y´}` renames the term name `´p´.´x´` to the term name ´y´ and the type name `´p´.´x´` to the type name ´y´.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
For instance, an import clause `import ´p´.{´x´ => ´y´}` renames the term name `´p´.´x´` to the term name ´y´ and the type name `´p´.´x´` to the type name ´y´.
For instance, an import clause `import ´p´.´x´ as ´y´` renames the term name `´p´.´x´` to the term name ´y´ and the type name `´p´.´x´` to the type name ´y´.

Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

lgtm except some style points

@sjrd sjrd force-pushed the spec-syntax-changes branch from 1e09225 to cbf9d42 Compare June 21, 2023 08:58
@sjrd sjrd merged commit a8e9312 into scala:main Jun 21, 2023
@sjrd sjrd deleted the spec-syntax-changes branch June 21, 2023 08:59
Kordyjan added a commit that referenced this pull request Dec 8, 2023
Backports #17943 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
@Kordyjan Kordyjan added this to the 3.3.2 milestone Dec 14, 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.

3 participants