Skip to content

Conversation

@BipulLamsal
Copy link

fix for the issue #1536

fn parse_enum_element(lexer: &mut ParseSession) -> Option<AstNode> {
let start = lexer.location();

let idfr = parse_identifier(lexer)?;
Copy link
Author

Choose a reason for hiding this comment

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

before enum identifier are checked prior it doesnot pass one of the test which validates for expression and here the check is actually expects identifier instead of literal.

@ghaith
Copy link
Collaborator

ghaith commented Oct 13, 2025

Hello @BipulLamsal
Thank you for the contribution.
Do you mind adding some tests to the changes? To make sure the intended behavior is now being triggered.
That is, we need to allow assignments to pass correctly, but we should get a syntax error when we use the = sign.

You can look at our parser tests to add a new test there.
I activated the workflow on our side but you can also activate the workflow in your branch to make sure the code compiles and tests correctly.

@volsa volsa changed the title fix: sytax error for enum type fix: syntax error for enum type Oct 16, 2025
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