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

Properly turn AQL declarations into EMF objects #129

Merged
merged 2 commits into from
May 6, 2020

Conversation

echebbi
Copy link
Collaborator

@echebbi echebbi commented May 6, 2020

Main changes

Little refactor of the parser (ModelBuilder) to create a cleaner EMF model.

As of now, AQL collections are turned into EDataType instances holding an EEList type and with bounds [0, 1]. This commit turns collections into ETypedElement holding the actual type with relevant bounds instead.

This homogenize datatypes and should ease further developments, e.g. to handle Sets properly (#67).

Bonus

Also provides a little enhancement: using += or -= on the result variable within a void operation now leads to the following error: 'result' is not available in a void method. Change method's return type.

The error was already shown when using the := operator.

@echebbi echebbi self-assigned this May 6, 2020
…upper bound (#129)

Because:
 - until now, AQL collections were turned into EEList datatypes with [0, 1] bounds.
   this is not standard and makes harder to deal with collections
 - it should allow for simplifying the code, especially in the type checker

Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
…d method (#129)

Because:
 - 'result' is not available in a void method
 - a warning is already shown when using := operator

Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
@echebbi echebbi force-pushed the properly-turn-AQL-declarations-into-EMF-objects branch from 9479393 to 72f610f Compare May 6, 2020 16:19
@echebbi echebbi merged commit 2dec214 into master May 6, 2020
echebbi added a commit that referenced this pull request May 6, 2020
…upper bound (#129)

Because:
 - until now, AQL collections were turned into EEList datatypes with [0, 1] bounds.
   this is not standard and makes harder to deal with collections
 - it should allow for simplifying the code, especially in the type checker

Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
@echebbi echebbi deleted the properly-turn-AQL-declarations-into-EMF-objects branch May 6, 2020 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant