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

Feature Modifiers and Eigenclasses #346

Merged
merged 8 commits into from
Apr 19, 2022
Merged

Conversation

flbulgarelli
Copy link
Member

@flbulgarelli flbulgarelli commented Apr 13, 2022

🎯 Goal

To add support for several frequent modifiers like private, protected, static and abstract in the Mulang AST. It also adds support for eigen-like OOP constructions, just as eigenclasses and eigenmethods - which are rare but essential to the Ruby language.

Very basic support for simple annotations is also added.

📝 Details

This PR does not introduce new expectations, only new Expression nodes:

  • Decorator for adding metadata to methods, classes, attributes and other - mostly OOP - constructions. It takes it name from the Python language concept of decorator which is similar to the annotation concept in Java and attribute in C#, but is usually used to also implement very basic OOP constructs like class and static methods.
  • EigenClass for opening instances and editing its eigenclass

👁️ See also

Related to #190
Related to #163
Related to #173
Fixes #174

@julian-berbel julian-berbel marked this pull request as ready for review April 19, 2022 18:02
Copy link
Member

@julian-berbel julian-berbel left a comment

Choose a reason for hiding this comment

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

Looks good! ❤️

@@ -159,6 +174,9 @@ data Expression
-- ^ Object oriented interface implementation
| Include Expression
-- ^ Object oriented mixin inclusion
| Decorator [Modifier] Expression
-- ^ Generic expression decorator for language modifiers and user-defined annotations
-- ^ Eigenclass object
Copy link
Member

Choose a reason for hiding this comment

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

leftover comment I think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup :(

@julian-berbel julian-berbel merged commit 4c456e9 into master Apr 19, 2022
@julian-berbel julian-berbel deleted the feature-support-modifiers branch April 19, 2022 21:29
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.

Support static/class vs non-static/instance methods
2 participants