Skip to content

Conversation

@dak2
Copy link
Owner

@dak2 dak2 commented Jan 25, 2026

Add basic module scope support

Enable parsing and scope management for Ruby module definitions.
This allows the type checker to properly handle methods defined
within modules and track their context.

Changes

  • Add ModuleNode AST processing in install.rs
  • Add extract_module_name() and install_module() in definitions.rs
  • Add enter_module() method in global_env.rs
  • Add current_module_name() in scope.rs
  • Add lookup_instance_var_in_module() in scope.rs
  • Add set_instance_var_in_module() in scope.rs
  • Update enter_method() to resolve receiver_type from module context
  • Add unit tests for module scope management

Enable parsing and scope management for Ruby module definitions.
This allows the type checker to properly handle methods defined
within modules and track their context.

# Changes
- Add ModuleNode AST processing in install.rs
- Add extract_module_name() and install_module() in definitions.rs
- Add enter_module() method in global_env.rs
- Add current_module_name() in scope.rs
- Add lookup_instance_var_in_module() in scope.rs
- Add set_instance_var_in_module() in scope.rs
- Update enter_method() to resolve receiver_type from module context
- Add unit tests for module scope management
@dak2 dak2 merged commit 5bf6fdf into main Jan 26, 2026
2 checks passed
@dak2 dak2 deleted the support-module branch January 26, 2026 13:34
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.

2 participants