+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_parser): Improve parser error for generator function in an ambient context #3778

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

denbezrukov
Copy link
Contributor

Summary

Add Generators are not allowed in an ambient context. error for generator functions in an ambient context.

Typescript playground

For function overloading Rome has an error:

if let Some(generator_range) = generator_range {
p.error(p.err_builder(
"An overload signature cannot be declared as a generator.",
generator_range,
));
}

Test Plan

cargo test

@denbezrukov denbezrukov requested a review from a team November 17, 2022 17:12
@netlify
Copy link

netlify bot commented Nov 17, 2022

Deploy Preview for docs-rometools ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6acf7d4
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/63774de4594da20008c5eb19
😎 Deploy Preview https://deploy-preview-3778--docs-rometools.netlify.app/playground
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

The code changes look good but we should remove the * from the definitions in the ungram file.

@MichaReiser MichaReiser added the A-Parser Area: parser label Nov 18, 2022
@MichaReiser MichaReiser added this to the 11.0.0 milestone Nov 18, 2022
@MichaReiser MichaReiser changed the title feat(rome_js_parser): declare generator function in an ambient context feat(rome_js_parser): Improve parser error for generator function in an ambient context Nov 18, 2022
@MichaReiser MichaReiser merged commit 2594803 into rome:main Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Parser Area: parser
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载