Skip to content

Comments

Add parser support for explicit resource management (using/await using)#4649

Open
abhinavs1920 wants to merge 1 commit intoboa-dev:mainfrom
abhinavs1920:feat/resource
Open

Add parser support for explicit resource management (using/await using)#4649
abhinavs1920 wants to merge 1 commit intoboa-dev:mainfrom
abhinavs1920:feat/resource

Conversation

@abhinavs1920
Copy link

@abhinavs1920 abhinavs1920 commented Feb 21, 2026

This Pull Request fixes/closes #4445

This PR introduces the parser foundation for the TC39 Explicit Resource Management proposal. It’s an initial step and does not yet include runtime support, which will be added gradually in future commits. Because this is a large feature, it will be developed over multiple commits.

It focuses on parsing support for using and await using, along with proper validation, AST integration, and test coverage. Runtime behavior is intentionally not included yet, using declarations are currently compiled as regular lexical bindings, with clear TODOs marking the follow-up work.

All existing parser tests continue to pass, and 5 new tests have been added for the new syntax. An example script and a short implementation roadmap are included to make future work straightforward.

This is the first step of a larger feature and is designed to be safe, incremental, and easy to review. Runtime disposal logic and related built-ins will be added in further commits of my work.

Thanks for reviewing!

…t using)

Signed-off-by: Abhinav Sharma <abhinavs1920bpl@gmail.com>
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 52,862 52,862 0
Passed 49,472 49,472 0
Ignored 2,249 2,249 0
Failed 1,141 1,141 0
Panics 0 0 0
Conformance 93.59% 93.59% 0.00%

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.

Implement explicit resource management proposal

1 participant