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

Properly raise SyntaxError for various mis-nested If/Elif/Else statements #610

merged 2 commits into from May 11, 2021

Properly raise SyntaxError for various mis-nested If/Elif/Else statements #610

merged 2 commits into from May 11, 2021


Copy link

This patch generalizes the fixes to #500 to correctly raise SyntaxError instead of silently doing the wrong thing for the statements Elif inside If, Else inside If, Elif inside Elif, and Else inside Else.

There are also new tests for these cases. Additionally there are new tests to verify the correct SyntaxError for Case inside Case, State outside of FSM, and State inside State (though their behavior was already correct and was not changed).

Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #610 (21147b0) into master (d824795) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #610   +/-   ##
  Coverage   81.50%   81.50%           
  Files          49       49           
  Lines        6461     6461           
  Branches     1287     1287           
  Hits         5266     5266           
  Misses       1008     1008           
  Partials      187      187           
Impacted Files Coverage Δ
nmigen/hdl/ 99.73% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d824795...21147b0. Read the comment docs.

@whitequark whitequark merged commit d09dedf into amaranth-lang:master May 11, 2021
Copy link


@tpwrules tpwrules deleted the error-mis-nested branch May 11, 2021 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants