Skip to content

Conversation

@yashwanthvanama
Copy link

Details

Added a new error specific for reserved keywords.
Update the Identified parsing logic to show the appropriate error.

Does this pull request introduce a breaking change?

  • 😮‍💨 No, it does not introduce a breaking change.

Does this pull request introduce an observable change?

  • 🤞 No, it does not introduce an observable change.

GUS work item

W-18040860

@yashwanthvanama yashwanthvanama requested a review from a team as a code owner December 20, 2025 14:44
Copy link
Contributor

@wjhsf wjhsf left a comment

Choose a reason for hiding this comment

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

Could you please explain the problem that this change is trying to solve? The error "const is not a valid identifier" already tells the user that they need to pick a new variable name; the new error message does not change that.

@yashwanthvanama
Copy link
Author

Could you please explain the problem that this change is trying to solve? The error "const is not a valid identifier" already tells the user that they need to pick a new variable name; the new error message does not change that.

Yes but in the current state, both my-item and const are displayed as not a valid identifier and doesn't specify why it was not a valid identifier. User would be able to understand that my-item is a invalid identifier because of the hyphen which is not the case for const. During const user wouldn't be able to understand why it is invalid identifier without the knowledge of reserved keywords in JS. Hence, this change would let the user know when the identifier they used matches any reserved keywords in JS.

@wjhsf
Copy link
Contributor

wjhsf commented Jan 7, 2026

/nucleus test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants