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

Support extensions #21

Open
MaxDesiatov opened this issue Jun 5, 2019 · 0 comments
Open

Support extensions #21

MaxDesiatov opened this issue Jun 5, 2019 · 0 comments
Assignees

Comments

@MaxDesiatov
Copy link
Owner

MaxDesiatov commented Jun 5, 2019

While all extensions would be merged into the same environment during typechecking, AST should have a separate type for extension nodes. Existence of members in the main type declaration, as compared to extension members, triggers different semantic checks, e.g. synthesized memberwise initializers etc. Besides, extensions can have predicates on them, which would also be represented on extension AST nodes.

This issue also requires the environment "transformer" mentioned in #19, that converts AST to environment, should also take extensions into account somehow. Maybe there should be a separate Environment type with mutating functions that can consume AST and modify the environment during AST traversal?

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

No branches or pull requests

1 participant