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

Handle nested if statements with alternates in printer #3180

Merged
merged 1 commit into from
Dec 18, 2015
Merged

Commits on Dec 18, 2015

  1. Handle nested if statements with alternates in printer

    Previously we saw a bug that when we have nested if statements
    and an alternate then the generated code may confuse which
    if statement the alternate belongs to.
    
    e.g.
    
    ```
    if (foo) if (bar) bar(); else baz();
    ```
    
    But this was handled by looking at the consequent
    and if it's an if we add a block. However we didn't
    handle situations where it's not an if but the last
    recursive statement is an if:
    
    ```
    if (foo) while (bar) if (baz) baz(); else shoosh()
    ```
    
    This handles it by recurring until we get the last
    statement.
    amasad committed Dec 18, 2015
    Configuration menu
    Copy the full SHA
    47b686b View commit details
    Browse the repository at this point in the history