Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle a missing property on member expressions better #4957

Merged
merged 1 commit into from
Aug 31, 2022

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented Jul 4, 2022

It is common for users to write x. and then query for completion, in which case we should not try to consume the next, non-identifier token as that will likely causing further parse failures.

@Marwes Marwes requested a review from a team as a code owner July 4, 2022 15:05
@Marwes Marwes requested review from Westonside and removed request for a team July 4, 2022 15:05
"#,
);
let parsed = p.parse_file("".to_string());
expect_test::expect![[r#"error @4:1-4:8: expected IDENT, got BUILTIN (builtin) at 4:1"#]]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this change we would also get an error complaining about the builtin statement being invalid as the builtin token was consumed.

@Marwes Marwes requested review from a team and scbrickley and removed request for Westonside and a team August 30, 2022 11:20
It is common for users to write `x.` in which case we should not try to consume the next, non-identifier token.
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