Add language support for RP2040 PIO ASM #1056
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for the PIO assembler language for the RP2040, including embedded C code. I have left the "detected" language from the embedded code snippets generic and hard-coded C for now, as it's possible they could add support for other languages (i.e., C++, Python) in the future. To accomplish this, I have included new patterns and language contexts and so on where necessary.
However, I did not know how to handle the fact that it's an error for a
% c-sdk {
to be unterminated by a matching%}
. At the moment, it simply treats it the same as Markdown--unbalanced is just treated as a valid block. Feedback would be appreciated. Relevant code snippets: here and here.