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: Syntax errors reported in bilingual macros #152

Conversation

slavek-kucera
Copy link
Contributor

fix: Syntax errors reported in bilingual macros (closes #144)
fix: Language server crashes on missing MEND.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

97.3% 97.3% Coverage
0.0% 0.0% Duplication


++curr_line_;
++curr_line_; // TODO: What are we doing here???
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe curr_line_ holds index of the current statement in the resulting macro definition

diagnoser.add_diagnostic(diag);
if (processor.kind != processing_kind::LOOKAHEAD)
{
for (const diagnostic_op& diag : cache_item->diags)
Copy link
Contributor

Choose a reason for hiding this comment

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

Now, that statements are able to hold diagnostics, should we get rid of cache_item->diags and store all the diagnostics directly in the statement instead?

Copy link
Contributor Author

@slavek-kucera slavek-kucera Jul 28, 2021

Choose a reason for hiding this comment

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

I think not just yet. Because from what I've observed, there are diagnostics that are printed once (e.g. during macro definition pass) and then there are diagnostics produced for each statement execution.
The current implementation tries to follow the behavior as closely as possible, but I think that we will need further refinement of how we store/replay diagnostics.

@slavek-kucera slavek-kucera merged commit a8b1201 into eclipse-che4z:development Jul 29, 2021
@slavek-kucera slavek-kucera deleted the syntax_error_collection_in_macros_dev branch July 29, 2021 11:39
@slavek-kucera slavek-kucera linked an issue Jul 29, 2021 that may be closed by this pull request
@github-actions
Copy link

🎉 This PR is included in version 0.14.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 0.14.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

Syntax errors reported in bilingual macros
2 participants