Skip to content

Feature/lambda selectors - #2648

Open
LlamaLad7 wants to merge 4 commits into
minecraft-dev:devfrom
LlamaLad7:feature/lambda-selectors
Open

LlamaLad7 wants to merge 4 commits into
minecraft-dev:devfrom
LlamaLad7:feature/lambda-selectors

Conversation

@LlamaLad7

@LlamaLad7 LlamaLad7 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Full resolution and completion support for lambda selectors, along with some related bugfixes. Commits best consumed individually.

Demo:

lambdaselectors2.mp4

Currently intermediate levels' quantifiers' min values are not checked, reporting this properly would be quite difficult and it is unlikely to be used by anyone anyway. This along with reporting failed quantifier minima in a more user-friendly way is left as future work.

@LlamaLad7
LlamaLad7 force-pushed the feature/lambda-selectors branch 2 times, most recently from 0488cd6 to 6a91e73 Compare October 1, 2026 20:18
@LlamaLad7
LlamaLad7 force-pushed the feature/lambda-selectors branch from 6a91e73 to 19d3c02 Compare October 1, 2026 21:58
NESTING_REGEX.matchEntire(name)?.let { match ->
name = match.groups["root"]!!.value.trim()
nextDepth = Quantifier.parse(match.groups["nextDepth"]!!.value) ?: return null
next = parse(match.groups["next"]!!.value) ?: return null

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe we can have a recursion limit here? Don't want to throw exceptions in the IDE in case someone does something silly. Although my attempts to create a stack overflow made the IDE slow for other reasons

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I could probably make it iterative if you think it matters, I'd be baffled if anyone nested more than two or three

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's better to put the limit in the parsing, other things are also recursive based on this

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah I did actually manage to make a stack overflow lol

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think anything else except the toString is recursive, could just fix them both

This branch has not been deployed

No deployments
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