-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Projects
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 onextension
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 withmutating
functions that can consume AST and modify the environment during AST traversal?The text was updated successfully, but these errors were encountered: