Skip to content
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

Change Tasty parameter encoding #7504

Merged
merged 2 commits into from Nov 7, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Nov 5, 2019

The new scheme is to drop PARAMS and to have PARAM, TYPEPARAM, and PARAMEND tags instead.

A PARAMEND is needed to mark a preceding empty parameter section,
or a following parameter section.

The advantage of the new scheme is that it also accommodates a possible generalisation of the language that allows interspersed type params and normal params as well as curried type params.
If we ever want to allow this, we can simply relax the posisble order of these sections; no new tags would be needed.

Bumps Tasty version.

New way is to have PARAM, TYPEPAAM, and PARAMEND tags.

A PARAMEND is needed to mark a preceding empty parameter section,
or a following parameter section.

Bumps Tasty version.
Param = PARAM Length NameRef type_Term rhs_Term? Modifier* -- modifiers name : type (= rhs_Term)?. `rhsTerm` is present in the case of an aliased class parameter
Template = TEMPLATE Length TypeParam* Params* parent_Term* Self? Stat* -- [typeparams] paramss extends parents { self => stats }, where Stat* always starts with the primary constructor.
PARAMEND -- ends a parameter clause
-- needed if previous parameter clause is empty or another parameter clause follows
Copy link
Member

Choose a reason for hiding this comment

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

The indentation doesn't line up here

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.

Otherwise LGTM

@bishabosha bishabosha assigned odersky and unassigned bishabosha Nov 6, 2019
@bishabosha bishabosha assigned bishabosha and unassigned odersky Nov 7, 2019
@bishabosha bishabosha merged commit 6b739d0 into scala:master Nov 7, 2019
@bishabosha bishabosha deleted the change-tasty-params branch November 7, 2019 10:31
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.

None yet

2 participants