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 indentation edge case in #763 #769

Merged
merged 1 commit into from
Mar 30, 2020
Merged

Conversation

kensoh
Copy link
Member

@kensoh kensoh commented Mar 28, 2020

No description provided.

@kensoh kensoh requested a review from siowyisheng March 28, 2020 08:13
@kensoh
Copy link
Member Author

kensoh commented Mar 28, 2020

Hi @siowyisheng I traced through the code. The solution is a simple fix to simply remove pre v6 functionality of auto-appending brackets for code such as below. Since the assumption is not to have backward compatibility, then the following block of code should have indentation given by user already instead of assuming indenting once on user's behalf.

for n from 1 to 10
echo `n`

This fix is tested to be working for -

for m from 1 to 3
    for n from 1 to 3
        echo `m`,`n`

and

for n from 1 to 20
    if (a==1)
        for p from 21 to 40
            echo `n` - `p`

For your review if this change works for the earlier test cases you used for this feature.

@siowyisheng
Copy link
Contributor

tested and working for the 6 cases in #746 . merged.

@siowyisheng siowyisheng deleted the indentation_edge_case1 branch March 30, 2020 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants