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.
Description
This PR replaces the workflow (read from widget -> write to file -> read from file) used by the
syrec-editor
python application to synthesis the user-defined SyReC program in the code editor widget by simply passing the contents of the code editor to the parser.The current workflow does not work under Windows due to a hard-coded path to the temporary file used to store the contents of the code editor and while a refactoring with the cross-platform
QTemporaryFile
would be possible, simply parsing the contents of the code editor using themqt.syrec.program_read_from_string(...)
functionality is easier.A small update to the regex used to split the reported errors of the parser as mentioned in the related issue was also added to cover all potential line endings generated by the parser.
Fixes #287
Checklist: