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

for nested in another thing, and if-else nested in said for #36

Open
PjrCodes opened this issue Jul 3, 2020 · 4 comments
Open

for nested in another thing, and if-else nested in said for #36

PjrCodes opened this issue Jul 3, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@PjrCodes
Copy link
Owner

PjrCodes commented Jul 3, 2020

if() {
    asd;
}
else
   for (a'adsd';)
       if  (*(void **)&od)
            _abr(_g, _pd, 0L);
       else
            _o or(_g, _z_, 0L);

Obviously gives error, No checking for these kind of nested blocks has been put till now in the code at all! These nested blocks have NEVER been tested till now!

@PjrCodes PjrCodes added the bug Something isn't working label Jul 3, 2020
@PjrCodes PjrCodes self-assigned this Jul 3, 2020
@PjrCodes
Copy link
Owner Author

PjrCodes commented Jul 6, 2020

For clarification, dividing into cases:
CASE 1 (fixed):

if() {
    asd;
}
else
       if  (*(void **)&ot d) {
            _o or(_g, _p lized, 0L);
       } else if (
           )
            as;
         else
            as;

The above gives the required output properly.

CASE 2 (error):

if() {
    asd;
}
else
       if  (*(void **)&o ) {
            _ or(_g, _p d, 0L);
       } else if () {
            as;
       } else if () {
            as;
       }

the above doesnt work, as it doesn't end on else

CASE 3 (error):

if() {
    asd;
}
else
   for (a'adsd';)
       if  (*(void **)&o d)
            _o r(_g, _pd ed, 0L);
       else
            _o r(_g, _ze enType, 0L);

this is the original problem, The for() causes problems.

@PjrCodes PjrCodes mentioned this issue Jul 6, 2020
@PjrCodes
Copy link
Owner Author

PjrCodes commented Jul 6, 2020

CASE 1 fixed in latest commit, Duplicate of #34

@PjrCodes PjrCodes reopened this Jul 7, 2020
This was referenced Jul 7, 2020
@PjrCodes
Copy link
Owner Author

PjrCodes commented Jul 12, 2020

if() {
    asd;
}
else
   for (a'adsd';)
       if  (*(void **)&o d)
            _os or(_g, _p , 0L);
       else
            _o r(_g, _z _O pe, 0L);

case 3 is working, correct number of {..}, but wrong indentation

@PjrCodes PjrCodes reopened this Jul 12, 2020
@PjrCodes
Copy link
Owner Author

PjrCodes commented Jul 12, 2020

if() {
    asd;
}
else
   for (a'adsd';)
       if  (*(void **)&ot )
            _os r(_g, _pd d, 0L);
       else
            _o or(_g, _z pe, 0L);

THIS STILL DOESNT WORK
However, this works WITH WRONG INDENTATION:

if() {
    asd;
}
else
   for (a'adsd';)
       if  (*(void **)&o d)
            _o r(_g, _p , 0L);

Repository owner locked as resolved and limited conversation to collaborators Mar 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant