Skip to content

Add nesting enum for indexer#421

Merged
vinistock merged 1 commit intomainfrom
01-08-add_nesting_enum_for_indexer
Jan 8, 2026
Merged

Add nesting enum for indexer#421
vinistock merged 1 commit intomainfrom
01-08-add_nesting_enum_for_indexer

Conversation

@vinistock
Copy link
Member

@vinistock vinistock commented Jan 8, 2026

This PR extracts just the new Nesting enum portion of #402, to make it a bit easier to handle the existing conflicts with main.

Basically, the definitions_stack becomes a nesting_stack, where we can store the IDs with a bit of differentiation and perform the right behaviour:

  • LexicalScope: anywhere the class or module keywords get used, which produces a new lexical scope that binds constants and class variables
  • Owner: definitions that can own things, but without producing a new lexical scope (like the ones created by Class.new)
  • Method: a method. Just used for instance variables, so that we know we're inside of a method

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock self-assigned this Jan 8, 2026
@vinistock vinistock marked this pull request as ready for review January 8, 2026 17:57
@vinistock vinistock requested a review from a team as a code owner January 8, 2026 17:57
LexicalScope(DefinitionId),
/// An owner entry that will be associated with all members encountered, but will not produce a new lexical scope
/// (e.g.: Module.new or Class.new)
#[allow(dead_code)]
Copy link
Member Author

Choose a reason for hiding this comment

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

This is dead just until the work on the other PR is complete.

@vinistock vinistock force-pushed the 01-08-add_nesting_enum_for_indexer branch from dfc8a2f to 81d47f7 Compare January 8, 2026 19:03
@vinistock vinistock enabled auto-merge (squash) January 8, 2026 19:03
@vinistock vinistock merged commit f55a5ce into main Jan 8, 2026
14 checks passed
@vinistock vinistock deleted the 01-08-add_nesting_enum_for_indexer branch January 8, 2026 19:10
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