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 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.
@odersky odersky requested a review from bishabosha Nov 5, 2019
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

This comment has been minimized.

Copy link
@bishabosha

bishabosha Nov 6, 2019

Member

The indentation doesn't line up here

Copy link
Member

bishabosha left a comment

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 lampepfl:master Nov 7, 2019
2 checks passed
2 checks passed
CLA User signed CLA
Details
continuous-integration/drone/pr Build is passing
Details
@bishabosha bishabosha deleted the dotty-staging:change-tasty-params branch Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.